I'm using igGrid with a column that has a combo editor provider. On adding a new row to the grid, I want to populate cells in the new row with data selected from the combo. So for example I add a new row, select from the combo. Based on the data attached to the combo, add values to other columns on the new row.I've figured out how to get the data from the selection choice. But then try and setCellValue and I don't know the row, since it is new and anything I try just gives an error saying the property isn't found. How can I do this, or how is this done?
Thank you for posting into our community!
I have been looking into your question and I believe that you will find the sample I have prepared for you quite helpful for achieving your requirement.
In the attached sample I have declared a few global variables that hold references to the editors of the other columns that should be populated with data based on the igCombo selected value. Then, in the editCellStarting event, if the ui.rowAdding property is true I am assigning the editors of the columns to the respective global variables. Afterwards, in the selectionChanging event by using the appropriate editors, in this case – igTextEditor and igDateEditor, I am setting the new values for the other columns.
On my side, everything works as expected and when selecting a value from the igCombo dropdown, the other columns are populated with the data from that selection. This could be observed in the attachment below:
Here could be found my sample for your reference. Please test it on your side and let me know if you need any further assistance regarding this matter.
Looking forward to your reply.
Sincerely,Riva IvanovaEntry Level Software Developer