CommandItemDisplay
="Bottom" property adds the "Add new record" and "Refresh" button by default.
But my requirement is want to display only the Refresh button.
The Add New Record Text and Image is not required.
How can i accomplish this??
Kindly help me...
4 Answers, 1 is accepted
0
Hi Sathya,
To hide a button from the default RadGrid command item, you can reference the respective button by its id (intercepting the ItemCreated event of the grid) and set its Visible property to false. Alternatively, define your own command item template as explained in this help article.
Best regards,
Stephen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
To hide a button from the default RadGrid command item, you can reference the respective button by its id (intercepting the ItemCreated event of the grid) and set its Visible property to false. Alternatively, define your own command item template as explained in this help article.
Best regards,
Stephen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Shinu
Top achievements
Rank 2
answered on 05 Sep 2008, 09:11 AM
Hi Sathya,
You can try the following code snippet to achieve the desired scenario.
CS:
Thanks
Shinu.
You can try the following code snippet to achieve the desired scenario.
CS:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) |
{ |
if (e.Item is GridCommandItem) |
{ |
GridCommandItem cmditm = (GridCommandItem)e.Item; |
Button btn1 = (Button)cmditm.FindControl("AddNewRecordButton"); |
btn1.Visible = false; |
LinkButton lnkbtn1 = (LinkButton)cmditm.FindControl("InitInsertButton"); |
lnkbtn1.Visible = false; |
} |
} |
Thanks
Shinu.
0
Alain
Top achievements
Rank 2
answered on 04 Feb 2012, 05:35 PM
Hello,
The help article link mentionned in this post is not working.
Any replacement ?
Thank you
Alain
The help article link mentionned in this post is not working.
Any replacement ?
Thank you
Alain
0
Hi Sathya,
Here are the help articles links:
http://www.telerik.com/help/aspnet-ajax/grid-commanditemtemplate.html
http://www.telerik.com/help/aspnet-ajax/grid-localizing-gridcommanditem.html
Regards, Tsvetoslav
the Telerik team
Here are the help articles links:
http://www.telerik.com/help/aspnet-ajax/grid-commanditemtemplate.html
http://www.telerik.com/help/aspnet-ajax/grid-localizing-gridcommanditem.html
Regards, Tsvetoslav
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>