jQuery UI Widgets › Forums › Grid › Combo box with different items for different rows.
Tagged: createeditor, grid, initeditor
This topic contains 4 replies, has 3 voices, and was last updated by Martin 2 years, 11 months ago.
-
Author
-
Hello,
I want to have a combobox column in the jqxGrid.
The same combobox will be used for all the rows but with some list filters based on other column value.I am trying with initeditor with no success.
Also want to know that, is createeditor is required along with initeditor.
Please provide combobox example with initeditor.
Regards,
MaheshHello,
Another query.
I have a column in the jqxGrid with columntype combobox.
I want the ComboBox list items to be refreshed with some different items for each row based on other cell value of the current row.In the following code snippet aryRateType is the data source of the ComboBox.
Which event should I use to change the data source dynamically?
What is good option, change the entire data source or replace items from the data source.
Total items are 15 and out of them 3 to 5 needs to be shown in the ComboBox list.
Give me some example.….
…. createeditor = function (row, cellValue, editor, cellText, width, height) {
editor.jqxComboBox({
source: aryRateType, displayMember: ‘RateTypeDesc’, valueMember: ‘RateType’,
width: width, height: height
})Best regards,
MaheshHi Mahesh,
You should use the initeditor callback function which allows you to change the data source dynamically depending on your edit situation and web application requirements.
Best regards,
Peter StoevSmart UI Team
https://www.htmlelements.com/Hi Peter
I mention already that, I tried initeditor with no success and you are suggesting me again to do the same thing.
Even I referred the documentation thoroughly (which has always been nightmare for me).My question was “Also want to know that, is createeditor is required along with initeditor.”
Are they substitute for each other, but just wanted to confirm that with you. But you didn’t answered that.The real problem is that, when I expect initeditor to be called but then the createeditor also gets called every time.
The documentation says that “This function is called only once – when the editor is created.”Please provide me some example about how to change the data source dynamically, in case of combobox column type.
Best regards,
MaheshHello Mahesh,
You can check our Cascading ComboBoxes Demo. There the source of the second column combobox editor is updated dynamically.
Best Regards,
Martin YotovjQWidgets team
https://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.