Title: Combogrid selectRow no longer working Post by: bduguay on June 16, 2015, 12:41:12 PM 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. Code: // Set the control name to a variable to eliminate the DOM lookups Any help would be appriciated. Title: Re: Combogrid selectRow no longer working Post by: stworthy on June 16, 2015, 05:10:53 PM Please refer to this example http://jsfiddle.net/xoq868cz/. It works fine.
Title: Re: Combogrid selectRow no longer working Post by: bduguay on June 17, 2015, 07:54:47 AM Thank you for your response.
Yes your code works correctly but if I change the data to Code: {number:'-1',title:'Joe1'}, and the code to Code: var keyNumber = 'Joe2'; it will still show 'Joe1' and not 'Joe2' as expected. Title: Re: Combogrid selectRow no longer working Post by: bduguay on June 19, 2015, 06:23:29 AM I have made a work around for the problem.
I set the idField for the combogrid based on if the field called 'number' contains data. If there is data in the field, set it as the idField, otherwise set the idField to a field called 'title'. Code: function setIdField(containsNumberField) { Thank you for your assistance. |