Hi, I'm trying to createmy custom grid control that inherits RadGrid. I want after binding my grid (with or without autogenerated columns) to add always three columns (for editing, selecting and deleting records) as last three grid's columns. What would be the bast way to do that? What RadGrid's event would be best to override? Thanks, Ana
4 Answers, 1 is accepted
0
Hello Ana,
I suggest you review those two links which explains what you should know when inheriting Telerik RadGrid :
http://www.telerik.com/help/aspnet-ajax/grdinheritance.html
http://www.telerik.com/help/aspnet-ajax/grdinheritgridcolumns.html
To achieve your goal I will suggest you override the OnInit event. Here is a code snippet showing how to achieve this:
Kind regards,
Georgi Krustev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
I suggest you review those two links which explains what you should know when inheriting Telerik RadGrid :
http://www.telerik.com/help/aspnet-ajax/grdinheritance.html
http://www.telerik.com/help/aspnet-ajax/grdinheritgridcolumns.html
To achieve your goal I will suggest you override the OnInit event. Here is a code snippet showing how to achieve this:
| public class InheritedGrid : RadGrid |
| { |
| protected override void OnInit(EventArgs e) |
| { |
| this.ClientSettings.Selecting.AllowRowSelect = true; |
| this.Columns.Add(new GridEditCommandColumn()); |
| this.Columns.Add(new GridClientDeleteColumn()); |
| this.Columns.Add(new GridClientSelectColumn()); |
| base.OnInit(e); |
| } |
| } |
Kind regards,
Georgi Krustev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Ana
Top achievements
Rank 1
answered on 27 Apr 2009, 12:13 PM
Thanks for your reply! Still, these columns are first three columns, and I want them to be on the end. How to achieve that?
Ana
Ana
0
Hello Ana,
Thank you for getting back to us.
In my attempt to implement the required functionality I have created a test project. The three columns in it are rendered in the end of the grid. Please examine it and let me know if I can assist you additionally.
Greetings,
Georgi Krustev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Thank you for getting back to us.
In my attempt to implement the required functionality I have created a test project. The three columns in it are rendered in the end of the grid. Please examine it and let me know if I can assist you additionally.
Greetings,
Georgi Krustev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Doug Beard
Top achievements
Rank 1
answered on 02 Nov 2009, 03:07 PM
I WISH THIS FORUM HAD A DELETE BUTTON.
Post removed because I'm dim.
Post removed because I'm dim.