radgrid export icons

2 posts, 0 answers
  1. David
    David avatar
    1 posts
    Member since:
    Jul 2013

    Posted 12 Jul 2013 Link to this post

    Hello,
    I have to export data from a RadGrid to Excel, but I want to hide the other icons, but I can not hide the separator, as I can do?

    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

    // cmditm.FindControl("Separator").Visible = false;





    thanks
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 15 Jul 2013 Link to this post

    Hi David,

    Please try setting the following CSS class for your Grid.

    CSS:
    .RadGrid_SkinName .rgCommandRow
    {
       color: Transparent !important;
    }

    Thanks
    Shinu
Back to Top