How to make child rows non-editable

Kushal

I have a requirement to edit the parent row but child rows should not be editable. when a value in the parent cell updated, the same cell in all the child rows should be updated with the same value.
Please let me know how to make parent row editable but at the same time child rows should not be editable and how to udpate the values to child rows on modification of a parent row?

Kushal

Tsvetina

You could use the ItemCreated event of the RadTreeList and based on the NestedLevel of the TreeListDataItem, to access the controls of the edit command column and switch their visibility. The NestedLevel is available through (e.Item as TreeListDataItem).HierarchyIndex.NestedLevel.

As for updating the child rows data based on the currently updated parent row, you could loop through the parent's ChildItems collection, fire an Update command for each and change the value in question inside the UpdateCommand event.

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

If you want to hide specific ones, you can use FindControl in the specific cell (that I assume you have already accessed) to and use the following IDs to access the edit and insert button:InsertButton_EditColumn
EditButton_EditColumn
e.g.

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

Kushal

I have a asp.net DropDownList in a TreeListTemplateColumn.
In InsertCommand event how do you access dropdownlist's selected value.

I tried the following code, but it table doesn't contain template column value. Is there any specific way to retrieve it.
Hashtable table = new Hashtable();
TreeListEditableItem item = e.Item as TreeListEditableItem;
item.ExtractValues(table);

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

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.