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

How to put grid with self-referencing hierarchy in edit mode?

1 Answer 43 Views
Grid
This is a migrated thread and some comments may be shown as answers.
pawelg
Top achievements
Rank 1
pawelg asked on 21 Aug 2012, 10:47 AM
Hello,
I'm using grid with self-referencing hierarchy based on this example: http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/selfreferencing/defaultcs.aspx.

I would like to put all items that do not have children in edit mode (InPlace) to let user set the amount of requested products in the textbox.

I tried solutions from http://www.telerik.com/help/aspnet-ajax/grid-put-all-items-in-edit-mode-no-additional-rebind.html, but to no avail.

The first method works fine for normal grid, but in that case (for grid with hierarchy) it allows to edit only root nodes (and makes expanding impossible). 

Is there something I can do? Or maybe there is other control to display hierarchy (like treelist) which allows to use textbox? Because I need to display tree of products and allow user to choose which and how many products he wants.

Thank you in advance

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 24 Aug 2012, 01:51 PM
Hello,

For self-referencing scenarios, where you need to display and edit data, I would strongly recommend you to use RadTreeList. The self-referencing mode of RadGrid was implemented to cover simple scenarios while there wasn't a dedicated control for such type of data.

With RadTreeList, you can specify templates for regular and edit mode, so it is fine to have such textbox, even if the item is not in edit mode.

You can see some editing demos at the following addresses:
TreeList / NET 3.5 automatic data editing
TreeList / Form Template/User Control Edit Form
TreeList / Custom Editors

Greetings,
Tsvetina
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.
Tags
Grid
Asked by
pawelg
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or