Hello,
I´m traying to use the AllowAddNewRow property of RadGridView but
i have an error when set to true this property.
The error ocurrs when you configures the grid with readonly columns property.
When you drag and drop the "Click here to add new row" cell to other readonly cell in diferent row.
this is my example
to resolve this error i have to set each cell for this row to readonly
The error says Message= "No se puede convertir un objeto de tipo 'Telerik.WinControls.UI.GridViewDataRowInfo' al tipo 'Telerik.WinControls.UI.GridViewNewRowInfo'.
"Unable to cast object of type 'Telerik.WinControls.UI.GridViewDataRowInfo' to type 'Telerik.WinControls.UI.GridViewNewRowInfo'.
I´m traying to use the AllowAddNewRow property of RadGridView but
i have an error when set to true this property.
The error ocurrs when you configures the grid with readonly columns property.
When you drag and drop the "Click here to add new row" cell to other readonly cell in diferent row.
this is my example
GridViewTextBoxColumn
txtEstatus = new GridViewTextBoxColumn();
txtEstatus.Name =
"Estatus";
txtEstatus.HeaderText =
"Estatus";
txtEstatus.ReadOnly =
true;
radGridView1.Columns.Add(txtEstatus);
GridViewTextBoxColumn txtot = new GridViewTextBoxColumn();
txtot.Name =
"OT";
txtot.ReadOnly =
true;
txtot.HeaderText =
"OT";
radGridView1.Columns.Add(txtot);
radGridView1.AllowAddNewRow =
true;
radGridView1.AutoSizeColumnsMode =
GridViewAutoSizeColumnsMode.Fill;
radGridView1.Rows.Add((
new List<string> {"333","333","dd","dd" }).ToArray());
to resolve this error i have to set each cell for this row to readonly
The error says Message= "No se puede convertir un objeto de tipo 'Telerik.WinControls.UI.GridViewDataRowInfo' al tipo 'Telerik.WinControls.UI.GridViewNewRowInfo'.
"Unable to cast object of type 'Telerik.WinControls.UI.GridViewDataRowInfo' to type 'Telerik.WinControls.UI.GridViewNewRowInfo'.