New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

EditForm Types

RadTreeList supports the below edit form types:

The default edit form type of RadTreeList is AutoGenerated. To specify which edit form type will your control, you can set its EditFormSettings-EditFormType property to one of the above values.

AutoGenerated edit form

When the EditFormType is set to AutoGenerated (the default value), RadTreeList will generate the edit form for you. Thus when an item goes in edit mode, the built-in editors for each column, which is not marked as ReadOnly, will be displayed.

<telerik:RadTreeList RenderMode="Lightweight" ID="RadTreeList1" runat="server"
    DataKeyNames="EmployeeID" ParentDataKeyNames="ReportsTo" DataSourceID="SqlDataSource1">
    <EditFormSettings EditFormType="AutoGenerated" />
</telerik:RadTreeList>

You can use the auto-generated edit form will all edit modes: InPlace, EditForms and PopUp.

Template edit form

There are many cases where you would choose to define your own edit form. One option is to set the EditFormType property to Template. Then you should place the definition of the form in the FormTemplate of the RadTreeList control.

<telerik:RadTreeList RenderMode="Lightweight" ID="RadTreeList2" runat="server"
    DataKeyNames="EmployeeID" ParentDataKeyNames="ReportsTo" DataSourceID="SqlDataSource1">
    <EditFormSettings EditFormType="Template">
        <FormTemplate>
        ....
        </FormTemplate>
    </EditFormSettings>
</telerik:RadTreeList>

You can use the template edit form with the following edit modes: EditForms and PopUp.

WebUserControl edit form

Another approach you can use to define your custom edit form is to place it in a separate WebUserControl. In this case you need to set the EditFormType property to WebUserControl. In addition in the EditFormSettings set the UserControlPath property to the path of the custom user control.

<telerik:RadTreeList RenderMode="Lightweight" ID="RadTreeList3" runat="server" 
    DataKeyNames="EmployeeID" ParentDataKeyNames="ReportsTo" DataSourceID="SqlDataSource1">
    <EditFormSettings EditFormType="WebUserControl" UserControlPath="EmployeeDetailsCS.ascx" />          
</telerik:RadTreeList>

You can use the user control edit form with the following edit modes: EditForms and PopUp.

See Also

In this article