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

Grid hierarchy

2 Answers 26 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ahmed Ilyas
Top achievements
Rank 1
Ahmed Ilyas asked on 30 Jan 2013, 04:01 PM
Hi.
So I have the RadControls for ASP.NET AJAX.

I have a hierarchy data (think of it as multi level sub menus).
I want to display this in the UI but in a grid view (no client side rendering/filtering) of some kind.
At the same time, I want to add custom controls or column to represent the item value, such as a checkbox or editable textbox.
I also want to add a column where it would have the options for "Update"
When they press Update, I want to be able to get the entire row details which contains the changes made by the user

does RadControls have anything like this? Any samples of it?
Many thanks!

2 Answers, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 04 Feb 2013, 03:42 PM
Hello Ahmed,

Thank you for contacting us.

We do not have a ready example for this scenario but it can be implemented. In order to achieve this you can use a hierarchical RadGrid with template columns which will contain the check box and the editable text box. I suggest that you review the following help topics and demos which will help you build up your project:
  1. To get a better understanding of RadGrids hierarchy structure please review the hierarchy section.
  2. A more clear idea of how to implement the template and the update columns you can find in this help article. Sections GridTemplateColumn and GridButtonColumn will be particularly helpful.
  3. Additionally please review this demo which illustrates CRUD operations in a hierarchical grid. If you want to fire commands manually from the code, I suggest that you take a look at this article which illustrates that.
  4. Extracting data from the grid records can be achieved by setting DataKeyNames. Later when you obtain a reference to the GridDataItem you can use GetDataKeyValue for extraction. Additionally you can extract the data directly from the grid cells. Accessing rows and cells in RadGrid is demonstrated here.

Hope the information provided helps you on implementing the described functionality.
Regards,
Angel Petrov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Ahmed Ilyas
Top achievements
Rank 1
answered on 04 Feb 2013, 04:33 PM
Thanks.
its a shame there is no sample. I have had  to revert to using the classic/great old fashioned way of using the ASP.NET repeater control to achieve what I wanted as I had lost alot of time trying to get it to work with the RadGrid and it just did not work and numerous other issues like the header columns being lost after postback or when placed on Page_Init to add those columns, it would duplicate itself and so on.

Maybe when I get time, I can make a sample and submit it.

Thanks again.
Tags
General Discussions
Asked by
Ahmed Ilyas
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Ahmed Ilyas
Top achievements
Rank 1
Share this question
or