문제

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