I am trying to change the cell type from DataGridViewTextBoxCell to DataGridViewCheckBoxCell @ runtime as below:
DataGridViewCheckBoxCell chkBoxCell = new DataGridViewCheckBoxCell();
FeatureGridView[1, 1] = chkBoxCell;
However, the application crashes everytime while painting the control giving the following error:
------------------------------------------------------
DataGridView Default Error Dialog
------------------------------------------------------
The following exception occurred in the DataGridView: System.FormatException: Formatted value of the cell has a wrong type. To replace this default dialog please handle the DataError event.
Can anyone help me in resolving the error ?
Thanks