Domanda

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

È stato utile?

Soluzione

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);
};
});
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top