SMART datagrid v.1 > Classes > GridBase
Return information of the first grid cell which meets the conditions specified by parameters.
If no corresponding cell, it will return null. In the table below, it will explain the properties of result object being returned.
Property | Explanation |
---|---|
rowIndex | Row number of the searched cell. |
fieldIndex | Field index of the searched cell. |
fieldName | Field name of the searched cell. |
searchFieldIndex | Location of field which has been searched among the list of fields. |
Property | Default Value | Explanation |
---|---|---|
caseSensitive | false | If it is true, it will be case sensitive. |
partialMatch | false | If it is true and the value is contained as partial field value, it will be considered as correct. |
var prevRow = -1;
var prevField = -1;
$('#search').click(function () {
var val = $('#cond').val();
var options = { partialMatch: true };
var result = grid.searchCell(['name', 'addr'], val, options, prevRow + 1, prevField + 1, true, true);
if (result) {
prevRow = result.rowIndex;
prevField = result.searchFieldIndex;
}
});