I have configure the combo box on grid like that
columnKey:"ChartOfAccountId", editorType:'combo', required:true, editorOptions:{ // mode:"dropdown", filteringType:'local', dataSource:dsCOA, textKey:"Title", valueKey:"ID", renderMatchItems:'startsWith', filteringCondition:'contains'
the data save perfectly but when load and I click on the row the combo cell goes blank. When I comment filterType:"local", then it worked fine. This happens amazingly because on some rows it work fine. The defference i found is when ui.editor._oldCellVal=null
;
How to fix this, if we are using min file?
Hi shamimafridi,
Thank you for report.The scenario when combo-grid-editor has enabled filtering was missed. The data source and selection was not cleared after possible filtering-action used for previous-edit-cell. In this situation combo contained previously filtered data and initialization of new value/selection might fail.
That has been fixed and update will be available within coming service releases.
Note:If you use separate js files rather than combined/minimized single file, then you may fix that issue on your machine by following change in the ig.ui.grid.updating.js file:1. Open that file in any text editor2. Find member function setValue of $.ig.EditorProviderCombo3. Remove old content which is probably return this.editor.options.allowCustomValue ? this.editor.text((val === null ? (this.editor.options.nullText === null ? "" : this.editor.options.nullText) : val)) : this.editor.value(val);4. Copy/paste following codes: var combo = this.editor, o = combo.options; if (o.filteringType) { combo.selectedIndex(-1); combo.activeIndex(-1); combo.dataBind(); } return o.allowCustomValue ? combo.text((val === null ? (o.nullText || "") : val)) : combo.value(val);
If that will not work or you have any other questions, then I will be happy to help.
I have done it but with little extra effor to adding the following line in
editCellStarted event, if (ui.rowAdding == false && ui.columnKey === "ChartOfAccountId") { ui.editor.data().igCombo.text(ui.editor[0].nextSibling.data);
}