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

How to Remove Refresh button

12 Answers 752 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
Anto (DLL Version : 2008.3.1314.35) asked on 23 Oct 2009, 08:03 AM
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

12 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 23 Oct 2009, 08:37 AM
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.
0
Daniel
Telerik team
answered on 23 Oct 2009, 08:37 AM
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.
0
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
answered on 24 Oct 2009, 09:34 AM
Hi Shinu

Thank You very much

-Anto
0
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
answered on 24 Oct 2009, 09:36 AM
Hi Daniel

Thank You very much.

But I have used what Shinu has told.

Because I have aalready used ItemDataBound in my page.

-Anto
0
Bruno
Top achievements
Rank 2
answered on 25 Oct 2009, 08:09 PM
0
Daniel
Telerik team
answered on 25 Oct 2009, 08:21 PM
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.
0
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
answered on 26 Oct 2009, 07:31 AM
Hi Daniel

Thank You.

-Anto
0
Mark
Top achievements
Rank 1
answered on 06 Aug 2013, 03:43 PM
I tried to hide the refresh button as you suggested, but it hides the export to excel button as well
0
Princy
Top achievements
Rank 2
answered on 07 Aug 2013, 03:38 AM
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
0
Mark
Top achievements
Rank 1
answered on 07 Aug 2013, 01:07 PM
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
0
Princy
Top achievements
Rank 2
answered on 08 Aug 2013, 03:15 AM
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
0
Karthikeyan
Top achievements
Rank 2
answered on 13 Mar 2016, 08:40 AM
"pageable" : { pageSize: 10,numeric: true,pageSizes: true, refresh: false },
Tags
Grid
Asked by
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Daniel
Telerik team
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
Bruno
Top achievements
Rank 2
Mark
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Karthikeyan
Top achievements
Rank 2
Share this question
or