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

To remove the refresh button

1 Answer 75 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 14 Sep 2012, 04:51 AM
Hi,

How to remove the refresh button in code behind?
Any help is highly appreciated.

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 14 Sep 2012, 05:01 AM

Hi,

Please take a look into the following code snippet I tried to remove the Refresh button in code behind.

C#:

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
    if (e.Item is GridCommandItem)
    {
        GridCommandItem item = (GridCommandItem)e.Item;
 
        //hide refresh linkbutton 
        ((LinkButton)item.FindControl("RebindGridButton")).Visible = false;
 
        //hide refresh icon 
        ((Button)item.FindControl("RefreshButton")).Visible = false;
    
}

Regards,
Princy.

Tags
Grid
Asked by
Steve
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or