jQWidgets Forums
jQuery UI Widgets › Forums › Grid › click on the custom combobox column in the grid taking the 1st value by default
This topic contains 6 replies, has 3 voices, and was last updated by simcon94 10 years, 11 months ago.
-
Author
-
July 5, 2014 at 12:49 pm click on the custom combobox column in the grid taking the 1st value by default #56797
Hi,
Whenever i click on the Customcombox column cell in the grid it is taking the 1st value from the combobox even if i give SelectedIndex=-1 in the createeditor.
{
text: ‘Title’, width: ‘15%’, dataField: ‘Titles’, displayfield: ‘FeatureSeriesTitle’, columntype: ‘combobox’, dropDownHeight: ‘250px’,
createeditor: function (row, value, editor) {
editor.jqxComboBox({ source: _titles, displayMember: ‘FeatureSeriesTitle’, valueMember: ‘PKTitleID’, selectedIndex: -1, });
}},
my requirement is that whenever i click on the cell blank cell should appear instead of taking the 1st value.please help me in this.
regards,
rani.July 5, 2014 at 1:30 pm click on the custom combobox column in the grid taking the 1st value by default #56799Hi rani,
“createeditor” is called once. Your custom combobox editor will be initialized just once so in case you want the index to be reset, you will have to implement the “initeditor” callback function, too. “initeditor” is called each time the editor is opened. I also suggest you to learn more how to create custom editors from the available demos.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/July 10, 2014 at 7:59 pm click on the custom combobox column in the grid taking the 1st value by default #57024Does it works?
I have the same problem with the source….i can’t refresh the sourceJuly 11, 2014 at 6:58 am click on the custom combobox column in the grid taking the 1st value by default #57050Hi simcon94,
Of course it works. “createeditor” is called once and only once. “initeditor” is called each time the editor is opened and that is true for any editor custom or not and this works perfectly well, too.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/July 11, 2014 at 7:14 am click on the custom combobox column in the grid taking the 1st value by default #57058But at me, the createeditor isn’t call once. It calls it every times. And the source didn’t refresh or update. Do you have an example?
July 11, 2014 at 7:18 am click on the custom combobox column in the grid taking the 1st value by default #57062Hi simcon94,
Yes, we have example. They are available here: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/index.htm. “createeditor” is called once. If you experience something else, then check whether you use “createeditor” or “initeditor”. The difference is explained in my previous posts.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/July 11, 2014 at 7:27 am click on the custom combobox column in the grid taking the 1st value by default #57063This doesn’t help me
-
AuthorPosts
You must be logged in to reply to this topic.