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

Increasing Nested Level of edit area on record Insert

0 Answers 13 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Dean
Top achievements
Rank 1
Dean asked on 17 Apr 2019, 09:19 PM

Hi there,

I'm trying to get a RadTreeList to create a child record on the next hierarchical level. I have EditMode="InPlace". I want to place the edit area to properly reflect where the child record will be placed, and I have attached pictures below with what I currently have and what I want.

Currently, the edit area appears on the same level as the record that the insert button was clicked. I need it to appear on the next level of nesting directly under the parent record, along with the appropriate tree lines.

Ideally I'd like a server-side implementation. Does anyone know if this is possible and if so, how I would be able to do it?

Thanks

 

ASPX:

<telerik:RadTreeList RenderMode="Lightweight" runat="server" ID="radTree" DataKeyNames="ID,PartNum" ParentDataKeyNames="ParentID,ParentPartNum" AutoGenerateColumns="false" EditMode="InPlace"
                     OnNeedDataSource="radTree_NeedDataSource"
                     OnItemDataBound="radTree_ItemDataBound"
                     OnUpdateCommand="radTree_UpdateCommand"
                     OnDeleteCommand="radTree_DeleteCommand"
                     OnInsertCommand="radTree_InsertCommand"
                     OnItemCreated="radTree_ItemCreated"
                     OnItemSelected=""
                     OnItemCommand="radTree_ItemCommand"
                     OnTreeShowingEditor=""
                     ExpandCollapseMode="Server" Width="100%" Skin="Windows7">
    <Columns>
        <telerik:TreeListEditCommandColumn UniqueName="EditCommandColumn"
                                            ButtonType="FontIconButton"
                                            HeaderStyle-Width="80px"
                                            AddRecordText="Add child part"
                                            EditText="Edit part">
        </telerik:TreeListEditCommandColumn>
        <telerik:TreeListButtonColumn UniqueName="DeleteCommandColumn"
                                        Text="Delete"
                                        CommandName="Delete"
                                        HeaderStyle-Width="40px"
                                        ButtonType="FontIconButton"
                                        ToolTip="Delete part">
        </telerik:TreeListButtonColumn>
        <telerik:TreeListBoundColumn DataField="ParentID"
                                        HeaderText="ParentID"
                                        UniqueName="ParentPath"
                                        Visible="false">
            <HeaderStyle Width="200px"></HeaderStyle>
        </telerik:TreeListBoundColumn>
        <telerik:TreeListBoundColumn DataField="ParentPartNum"
                                        HeaderText="ParentPartNum"
                                        UniqueName="ParentPartNum"
                                        Visible="false">
            <HeaderStyle Width="200px"></HeaderStyle>
        </telerik:TreeListBoundColumn>
        <telerik:TreeListBoundColumn DataField="ID"
                                        HeaderText="ID"
                                        UniqueName="ID"
                                        Visible="false">
            <HeaderStyle Width="200px"></HeaderStyle>
        </telerik:TreeListBoundColumn>
        <telerik:TreeListTemplateColumn UniqueName="PartNum"
                                        DataField="PartNum"
                                        HeaderText="Part Number"
                                        HeaderStyle-Width="300px">
            <ItemTemplate>
                <asp:Literal Text='<%#Eval("PartNum").ToString() %>'
                    runat="server" ID="PartNum"></asp:Literal>
            </ItemTemplate>
            <EditItemTemplate>
                <div style="display: inline-block">
                    <telerik:RadTextBox ID="txtPartNum"
                                        runat="server"
                                        Width="100px"
                                        Text='<%# Bind("PartNum")%>' />
                    <telerik:RadButton ID="radBtnSearch"
                                        runat="server"
                                        Text="Search"
                                        CommandName="openSearchErpPart"
                                        OnClientClicking="openSearchErpPart" />
                </div>
            </EditItemTemplate>
        </telerik:TreeListTemplateColumn>
    </Columns>
 
    <ClientSettings>
        <Scrolling AllowScroll="true" UseStaticHeaders="true" SaveScrollPosition="true" ScrollHeight="400px" />
        <Selecting AllowItemSelection="true" />
        <ClientEvents OnItemClick="itemClick" />
    </ClientSettings>
</telerik:RadTreeList>

 

 

No answers yet. Maybe you can help?

Tags
TreeList
Asked by
Dean
Top achievements
Rank 1
Share this question
or