Edit this page

Hide the Currently Edited Row

##

When you use EditForms edit mode you may prefer to hide the currently edited row (which by default is displayed above the edit form) and merely show that edit form. You can undertake this task by following the instructions below:

  1. Subscribe to the PreRender event of your grid instance

  2. Traverse the grid items and find the one that is currently in edit mode

  3. Set its Visible property to false

protected void RadGrid1_PreRender(object sender, System.EventArgs e)
{
    foreach (GridItem item in RadGrid1.MasterTableView.Items)
    {
        if (item is GridDataItem && item.Edit)
        {
            item.Visible = false;
        }
    }
}
Protected Sub RadGrid1_PreRender(ByVal sender As Object, ByVal e As System.EventArgs)
    Dim item As GridItem
    For Each item In RadGrid1.MasterTableView.Items
        If TypeOf item Is GridDataItem And item.Edit Then
            item.Visible = False
        End If
    Next item
End Sub