This is a migrated thread and some comments may be shown as answers.

Hide edit button

1 Answer 306 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joslyn
Top achievements
Rank 1
Joslyn asked on 09 Jun 2014, 12:17 PM
Hi
how to hide edit button in other rows when one row becomes in edit mode.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 09 Jun 2014, 12:29 PM
Hi Joslyn,

You can try the following code snippet in the PreRender event of radgrid.

C#:
protected void RadGrid1_PreRender(object sender, EventArgs e)
{  
  if (RadGrid1.EditItems.Count > 0)
  {
    foreach (GridDataItem dataItem in RadGrid1.Items)
    {
      //Access the Edit button with its UniqueName
      LinkButton lnkbtnEdit = (LinkButton)dataItem["EditColumn"].Controls[0];
      lnkbtnEdit.Visible = false;
    }
  }
}

Thanks,
Princy
Tags
Grid
Asked by
Joslyn
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or