I have a radGridView, bound to a datatable with certain columns marked as readonly. The problem is that for the readonly columns, the user can still attempt to edit the cell text/value and only upon leaving the cell are they presented with a message that appears as so.
My goal when clicking on the cell of a readonly column, BeginEdit would not fire (ie, the cursor would not enter the cell). I've tried creating several different events and checking if column is readonly and then cancelling the event but I seem to have no luck.
private void radGridView1_CellBeginEdit(object sender, GridViewCellCancelEventArgs e)
{
if (e.Column.ReadOnly)
{
e.Cancel = true;
}
}