Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5930979
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:37:47+00:00 2026-05-22T14:37:47+00:00

How on earth do I find the DataKey when I’m doing an update? I’ve

  • 0

How on earth do I find the DataKey when I’m doing an update? I’ve tried everything…

Private Sub rtlAccounts_UpdateCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.TreeListCommandEventArgs) Handles rtlAccounts.UpdateCommand
    Dim txtAccountDescription As RadTextBox = TryCast(e.Item.FindControl("txtAccountDescription"), RadTextBox)
    Dim txtAdminName As RadTextBox = TryCast(e.Item.FindControl("txtAdminName"), RadTextBox)
    Dim txtAdminEmail As RadTextBox = TryCast(e.Item.FindControl("txtAdminEmail"), RadTextBox)
    Dim rcbStatus As RadComboBox = TryCast(e.Item.FindControl("rcbStatus"), RadComboBox)
    Dim rntDocRetention As RadNumericTextBox = TryCast(e.Item.FindControl("rntDocRetention"), RadNumericTextBox)

    Dim item As TreeListEditableItem = TryCast(e.Item, TreeListEditableItem)
    Dim MyDataKeyID As String =  'Now what???
End Sub

Also would like to know how to find the ParentDataKeyValue from an InsertCommand and the UpdateCommand as well.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T14:37:47+00:00Added an answer on May 22, 2026 at 2:37 pm

    To get the DataKeyValue and the ParentDataKeyValue, change your last two lines to the following:

    Dim editedItem As TreeListEditFormItem = CType(e.Item, TreeListEditFormItem)
    Dim dataKeyValue As String = _
        editedItem.ParentItem.GetDataKeyValue("EmployeeID").ToString()
    Dim parentDataKeyValue As String = _
        editedItem.ParentItem.GetParentDataKeyValue("ReportsTo").ToString()
    

    Per Telerik’s documentation, if you are using InPlace edit mode you should cast the TreeListEditableItem to a TreeListDataItem; if you are using EditForms you should cast the TreeListEditableItem to a TreeListEditFormItem.

    In order for GetDataKeyValue and GetParentDataKeyValue to return the values you want, you must set them in the respective DataKeyNames and ParentDataKeyNames values when defining a RadTreeList:

    <telerik:RadTreeList ID="EmployeeTreeList" runat="server" 
        DataKeyNames="EmployeeID" 
        ParentDataKeyNames="ReportsTo">
        <Columns>
            <%-- Add column definitions here --%>
        </Columns>
    </telerik:RadTreeList>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

can we find area on earth using any web service powered by Google or
Is it possible to have Google Earth integrated into a Silverlight app? I've tried
I'm doing Augmented Reality research and am using OpenCV. I have the find checkerboard
i am using earth tool webservice to find time zone based on lat long.
I'm running google earth in a web browser that is embedded in a c#
Is Google Earth a Thick Client (Rich Client) application or a Rich Internet Application?
Why on Earth doesn't the interpreter raise SyntaxError everytime I do this: my_abc =
Now that Google Earth has been released for Android 2.1, does anyone know what,
I've been asked to add Google Earth images to a desktop app (civil engineering
The obvious way to plot a path with virtual earth (VEMap.GetDirections) is limited to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.