How to Remove Refresh button

13 posts, 0 answers
  1. Anto (DLL Version : 2008.3.1314.35)
    Anto (DLL Version : 2008.3.1314.35) avatar
    212 posts
    Member since:
    Mar 2009

    Posted 23 Oct 2009 Link to this post

    Hi All,

    I have RadGrid, with some datas.

    In the title bar I have "Add New Record" and "Refresh"

    Is there any option to remove this "Refresh"

    due to the reason I have done all the Rebind in code behind itself. So no need of the refresh button.

    Thanking You

    -Anto
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 23 Oct 2009 Link to this post

    Hi Anto,

    Try the following code snippet in ItemDataBound event in order to hide the Refresh button.

    CS:
     
    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
        }  

    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Daniel
    Admin
    Daniel avatar
    4945 posts

    Posted 23 Oct 2009 Link to this post

    Hello Anto,

    Try the following:
    protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
    {
        if(e.Item is GridCommandItem)
            e.Item.FindControl("RefreshButton").Parent.Visible = false;
    }

    Regards,
    Daniel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  5. Anto (DLL Version : 2008.3.1314.35)
    Anto (DLL Version : 2008.3.1314.35) avatar
    212 posts
    Member since:
    Mar 2009

    Posted 24 Oct 2009 Link to this post

    Hi Shinu

    Thank You very much

    -Anto
  6. Anto (DLL Version : 2008.3.1314.35)
    Anto (DLL Version : 2008.3.1314.35) avatar
    212 posts
    Member since:
    Mar 2009

    Posted 24 Oct 2009 Link to this post

    Hi Daniel

    Thank You very much.

    But I have used what Shinu has told.

    Because I have aalready used ItemDataBound in my page.

    -Anto
  7. Bruno
    Bruno avatar
    105 posts
    Member since:
    Mar 2008
  8. Daniel
    Admin
    Daniel avatar
    4945 posts

    Posted 25 Oct 2009 Link to this post

    Hello Anto,

    It doesn't matter which event you will choose - both snippets will help you hide the button. Shinu prefer to hide the buttons separately - I just compressed the same code in two lines.

    Regards,
    Daniel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  9. Anto (DLL Version : 2008.3.1314.35)
    Anto (DLL Version : 2008.3.1314.35) avatar
    212 posts
    Member since:
    Mar 2009

    Posted 26 Oct 2009 Link to this post

    Hi Daniel

    Thank You.

    -Anto
  10. Mark
    Mark avatar
    11 posts
    Member since:
    May 2012

    Posted 06 Aug 2013 Link to this post

    I tried to hide the refresh button as you suggested, but it hides the export to excel button as well
  11. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 06 Aug 2013 Link to this post

    Hi Mark,

    To hide the refresh button you can set the ShowRefreshButton="false" in the CommandItemSettings as shown below.

    ASPX:
    <telerik:RadGrid ID="RadGrid1" runat="server">
        <MasterTableView CommandItemDisplay="Top">
            <CommandItemSettings ShowRefreshButton="false" />     
        </MasterTableView>
    </telerik:RadGrid>

    Thanks,
    Princy
  12. Mark
    Mark avatar
    11 posts
    Member since:
    May 2012

    Posted 07 Aug 2013 Link to this post

    works, thank you!

    after I deploy to the production environment the Excel icon doesn't show on the page, but i can click on it and do the exporting, any idea what might cause that?

    Also would I be able to remove the vertical bar between Refresh and Excel icon?

    Thanks

    Mark
  13. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 07 Aug 2013 Link to this post

    Hi Mark,

    I'm not sure what is causing the export icon to hide,are you using any styles ? Try removing it and adding again,and check in all the browsers.

    ASPX:
    <CommandItemSettings ShowExportToExcelButton="true" />

    To hide the vertical bar between Refresh and Excel icon,please try the below code snippet.

    CSS:
    <style type="text/css">
     .RadGrid_SkinName .rgCommandRow
      {
        color: Transparent !important;
      }
    </style>

    Thanks,
    Princy
  14. Karthikeyan
    Karthikeyan avatar
    1 posts
    Member since:
    Jan 2014

    Posted 13 Mar Link to this post

    "pageable" : { pageSize: 10,numeric: true,pageSizes: true, refresh: false },
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017