Hi,
I have a data grid with Group columns. I am using OnCurrentCellBeginEdit event to restrict write access to some cells based underneath row data values. Here is the code I am using inside OnCurrentCellBeginEdit event:
if (args.Column.MappingName.Equals("Name"))
{
var rowIndex = MyGrid.ResolveToRecordIndex(args.RowColumnIndex.RowIndex);
var rowData = (MyGrid.View.Records[rowIndex]).Data as Student
if (rowData.Discontinued)
args.Cancel = true;
}
Problem is rowData returned is not the row inwhich I clicked on Name cell, I am guessing its because of the grouping row. What is the best way to correctly access RowData in OnCurrentCellBeginEdit event. Please let me know.
Note: Both args.RowColumnIndex.RowIndex & MyGrid.ResolveToRecordIndex(args.RowColumnIndex.RowIndex) doesnt work well.