RadGrid: hide add new and refresh buttons from code behind
protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item is GridCommandItem)
            {
                GridCommandItem cmditm = (GridCommandItem)e.Item;
                //to hide AddNewRecord button
                cmditm.FindControl("InitInsertButton").Visible = false;//hide the text
                cmditm.FindControl("AddNewRecordButton").Visible = false;//hide the image
                //to hide Refresh button
                cmditm.FindControl("RefreshButton").Visible = false;//hide the text
                cmditm.FindControl("RebindGridButton").Visible = false;//hide the image
   
            }
        }
 
6 comments:
Very helpful. Thank you for posting.
Thanks, that's what i needed.
Thanks a lot!
Awesome...
Thanks it helps a lot !!!
Thanks a lot!!! its very helpfull!!!
Post a Comment