jQuery UI Widgets › Forums › Grid › Dropdown List To Make Disable Problem
Tagged: DropDownList, grid
This topic contains 6 replies, has 2 voices, and was last updated by Martin 5 years, 10 months ago.
-
Author
-
Hello!
I have a problem about grid. I want to make disable some data in dropdown list. If the “Taşeron” of columnd is clicked, the data should be disable. It is difficult to expalin because of this I added some videos. I hope I could understand it.
Thanks
{ text: 'Seçenekler', datafield: 'SECENEKLER', columntype: 'dropdownlist', editable: true, cellclassname: cellclassname, width: '10%', createeditor: function (row, value, editor) { var SECENEKLER = ["Peşin Ödeme", "Sonradan Ödeme", "Doğrudan Alım", "Onaya Gönder", "İptal"]; editor.jqxDropDownList({ autoDropDownHeight: true, source: SECENEKLER, placeHolder: "Lütfen Seçiniz:" }); editor.bind('open', function (event) { //first, enable all items //second, disable items by value of rows var rowData = $('#TalepDegerlendir').jqxGrid('getrowdata', row); if (rowData.TASERON == 1) { editor.jqxDropDownList('disableItem', editor.jqxDropDownList('getItemByValue', "Peşin Ödeme")); editor.jqxDropDownList('disableItem', editor.jqxDropDownList('getItemByValue', "Doğrudan Alım")); editor.jqxDropDownList('disableItem', editor.jqxDropDownList('getItemByValue', "Onaya Gönder")); editor.jqxDropDownList('disableItem', editor.jqxDropDownList('getItemByValue', "İptal")); } }); },
https://drive.google.com/drive/folders/1jF-1A6ekA554qMw9URCvILFYprW61O4j?usp=sharing
Hello processmakeruser,
I have created this Example, based on your code.
It seems to work fine. On the rows where the “available” column box is checked, two of the dropdown option are disabled.Best Regards,
MartinjQWidgets Team
http://www.jqwidgets.com/Hi Martin!
I tried it like you said but it doesn’t work as I want. Mine is old version jqwidgets. It is jqwidgets v4.4.0 (2016-Now) version. I think because of this it doesn’t work well.
Can you help me how can I do it in this version?
Best Regards
Hello processmakeruser,
Yes, it seems that it is from the version.
I think that in the older version only one dropdownlist is created for all rows, so after that only theopen
event is fired.
So can you try this Solution, with getting the current row index in thecellbeginedit
event
and updating the dropdownlist options.Best Regards,
MartinjQWidgets Team
http://www.jqwidgets.com/Hi Martin!
Thanks a lot. I solved my problem thanks to you
Best regards
Hi Martin!
I have a problem and I write it both here and the forum in a new topic. I want to read data in nested grid without to do showrowdetails.
In addition I added a video. You can see my problem in the video.
Can you help me about it?
https://drive.google.com/open?id=1qfPEg4h1IeW70Sbd1UMQSCAFGzOyyoQV
Hello processmakeruser,
I have answered you in the new Topic that you’ve opened.
Best Regards,
MartinjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.