Hi,
I have a rad gridview windows control with a GridViewTextBoxColumn and a GridViewCheckBoxColumn. AllowAddNewRow is set to "True" for the Gridview. I have written code in DefaultValuesNeeded event to set the check box selected. I need to validate data in the current editing row before the focus moves to a new row or some other row. I have written code in CurrentRowChanging event to validate the data but the cell value is always null.
In which event should i write the code.
Regards
Shamjith
I have a rad gridview windows control with a GridViewTextBoxColumn and a GridViewCheckBoxColumn. AllowAddNewRow is set to "True" for the Gridview. I have written code in DefaultValuesNeeded event to set the check box selected. I need to validate data in the current editing row before the focus moves to a new row or some other row. I have written code in CurrentRowChanging event to validate the data but the cell value is always null.
private void radGridView1_CurrentRowChanging(object sender, CurrentRowChangingEventArgs e) |
{ |
if (e.CurrentRow == null) return; |
radGridView1.Invalidate(); |
var val = Convert.ToString(e.CurrentRow.Cells["column1"].Value); |
if (val == "test") |
{ |
MessageBox.Show("Invalid data"); |
e.Cancel = true; |
} |
} |
Regards
Shamjith