Last Updated: 15 Aug 2017 09:36 by ADMIN
Created on: 04 Dec 2012 02:24
Category: GridView
Type: Feature Request
ADD. RadGridView - validate the entire row by clicking the pencil icon in the grid's row header column
When the pencil icon is clicked the RowValidating event must be fired.

1. When clicking the "pencil" icon, the current row is not changed, thus the RowValidating is not fired. A suitable event to cover this case is the CellValidating event which will be triggered when the "pencil" icon is clicked. 
2. When the pencil is clicked, save the grid's CurrentRow, set it to null and then set it back to the saved row. This will trigger the RowValidating event and the desired logic will be executed. The downside of this approach is that the event will be triggered twice, because we change the CurrentRow twice.

void radGridView1_MouseDown(object sender, MouseEventArgs e)
    GridRowHeaderCellElement rowHeader = radGridView1.ElementTree.GetElementAtPoint(e.Location) as GridRowHeaderCellElement;
    if (rowHeader != null)
        GridViewRowInfo saveRow = radGridView1.CurrentRow;
        radGridView1.CurrentRow = null;
        radGridView1.CurrentRow = saveRow;