Hi,
I am working on windows based application using Datagridview. But I m stucked somewhere since longer time. Now I need help from you guys.
Following is my issue :
I am trying to show the combobox controls generating at run time in datagridview cells.
Initially when data is loaded it shows in textboxcells only but when i set focus to any particular cell or click on it, the cell gets converted to combobox and items are loaded in it from database and After setting values to each column of current row, Press enter key on last column which should send focus to the first cell of next row.
This happens absolutely fine for the first row but when I press enter button after choosing an item in combobox of last column. The focus goes to the next row and when i select any cell in the next row, then while converting it to combobx cell it show me an error message (Operation is invalid because it causes reentrant call to the setcurrentcelladdresscore function) My work stops over here.
I have written the above code in datagridview’s currentcellchanged event
The code line that i m using to convert the datagridviewtextboxcell to datagridviewcomboboxcell is:
dim cmbcell as new DataGridViewComboBoxCell
dgv(currentcell.columnindex, currentcell.rowindex) = cmbcell
//then add items to ‘cmbcell’.
Kindly please help me as fast as possible ?