Hi,
I am attempting to set a selected index for a combo editor within the add row of a grid. So when a user clicks to add a new row some values are already set to default values.
I have followed the example as detailed in this post:
https://es.infragistics.com/community/forums/t/94530.aspx
This works when using version 2014.2 but anything above 2015.2 this seems to fail to set the selected item of the combo editor. Could you please provide assistance in how I get the sample in the verified answer for 94530 to work with version 2015.2 of the control set?
Thanks,
Euan.
Hello Euan,
Thank you for posting in our community.
In order to set a default value for a combo editor within "Add new row" row the editRowStarted event can be handled. In this event a reference to the combo editor can be rerieved via editorForKey method. Afterwards, the index of the currently selected item can be set vie index method of igCombo. For example:
editRowStarted: function(evt, ui) { if( ui.rowAdding) { var editorName = $(ui.owner.editorForKey("Name")); editorName.igCombo("index", 0); }
I am also attaching a working sample illustrating my suggestion for your reference.
Please let me know if you need any further assistance with this matter.