I am using a prometheus radGrid. I have the Add New Record and refresh links at the top since I have this property set like:
CommandItemDisplay
="Top"
My question is, how do I remove the Refresh link? I just want the Add New Record to appear.
Thanks,
Bob
4 Answers, 1 is accepted
0
Hello Bob,
The easiest way is to define your own CommandItemTemplate with desired buttons. Other possible solution is to handle ItemCreated and set Visible = false for the Refresh button. Here is an example:
if(e.Item is GridCommandItem)
{
LinkButton LinkButton1 = e.Item.FindControl("RefreshButton");
LinkButton1.Visible = false;
}
All the best,
Vlad
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
The easiest way is to define your own CommandItemTemplate with desired buttons. Other possible solution is to handle ItemCreated and set Visible = false for the Refresh button. Here is an example:
if(e.Item is GridCommandItem)
{
LinkButton LinkButton1 = e.Item.FindControl("RefreshButton");
LinkButton1.Visible = false;
}
All the best,
Vlad
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Bob
Top achievements
Rank 1
answered on 19 Mar 2008, 04:16 PM
Vlad,
This did not work. I use VB.Net so maybe I did something wrong when I converted your C# example to VB.Net. Here is my code:
This did not work. I use VB.Net so maybe I did something wrong when I converted your C# example to VB.Net. Here is my code:
If
TypeOf e.Item Is GridCommandItem Then
Dim LinkButton1 As LinkButton = e.Item.FindControl("RefreshButton")
LinkButton1.Visible = False
End If
Anything else I can try?
Thanks,
Bob
0
Hi Bob,
Sorry for the wrong code - it seems that the ID for this button is "RebindGridButton".
Sincerely yours,
Vlad
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Sorry for the wrong code - it seems that the ID for this button is "RebindGridButton".
Sincerely yours,
Vlad
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0
Bob
Top achievements
Rank 1
answered on 19 Mar 2008, 04:29 PM
Thanks Vlad, that worked.
