i have a jqxgrid with a dropdown column. Now, if in a row a dropdown item is selected, this dropdown item should be deactivated in all following rows.

So, first i have to get all rows:

var rows = $('#jqxgridpop').jqxGrid('getboundrows');

then get all cells containing the dropdown

for (var i = 0; i < rows.length; i++) {
   var cell = $('#jqxgridpop').jqxGrid('getcell', i, 'languageddl');

and then, whit some magic, get the dropdowncontrol from the cell to disable the item. This is where i’m stuck..

Any hints or is this not possible? Thanks in advance

有帮助吗?

解决方案

I became an answer on the jqwidget forums, here the solution:

editor.bind('open', function (event) {
var rows = $('#jqxgridpop').jqxGrid('getboundrows');
for (var i = 0; i < rows.length; i++) {
    var value = $('#jqxgridpop').jqxGrid('getcellvalue', i, "languageCode");
    var item = editor.jqxDropDownList('getItemByValue', value);
    editor.jqxDropDownList('disableItem', item);
};
});
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top