I have upgraded from jQuery 1.11.0 to 2.13 and jQuery-EasyUI from 1.3.4 to 1.4.2 and I have now found that the selectRow for my combogrids is no longer working.
The issue is that the combogrid can have data with unique keys(1,2,3...) or all the same keys(they will all be '-1') and the title is the unique item.
If keyNumber='1' and keyName='Joe' it works.
If keyNumber='Joe' and keyName='Joe' it no longer works.
Here is my code.
// Set the control name to a variable to eliminate the DOM lookups
var $control = $(conName);
$control.combogrid('setValue', keyNumber)
.combogrid('grid').datagrid('selectRecord', keyNumber);
// If there isn't a row selected in the grid then just set the text in the box
if ($control.combogrid('grid').datagrid('getSelected') === null) {
$control.combogrid('setValue', keyNumber)
.combogrid('setText', keyName);
// Scroll to the item in the grid
} else {
$control.combogrid('grid').datagrid('scrollTo', $control.combogrid('grid').datagrid('getRowIndex', keyNumber));
}
// If there is a no row selected then find the matching area in the grid and select it
if ($control.combogrid('grid').datagrid('getSelected') === null) {
// Get the data from the combogrid
var comboData = $control.combogrid('grid').datagrid('getData'),
found = false,
i = 0;
// Search through the comboData for the key
if (comboData) {
while ((i < comboData.total) && (!found)) {
if ((isNaN(keyNumber)) && (comboData.rows[i].title === keyNumber) || (comboData.rows[i].number === keyNumber)) {
found = true;
} else {
i++;
}
}
}
// If the key is found then select it in the combogrid
if (found) {
$control.combogrid('grid').datagrid('selectRow', i);
}
}
Any help would be appriciated.