Help with Custom Attributes

3 posts, 0 answers
  1. Luc Émond
    Luc Émond avatar
    26 posts
    Member since:
    Jun 2010

    Posted 28 Mar 2011 Link to this post


    I'am using this exemple :

    Each node is equal to a text, but to insert it in the database i need to pass an ID.
    So is there a way to get ID from all the checkbox that are seleted?
    By ID i mean the id that i passing from the database

    Ex : If the user click the node
    École Donat-Robichaud then this school as an unique id from the database = 1
    École Secondaire-Assomption same thing id = 19

    I hope i explan my self correctly

    Here how i create my treeView :

    <telerik:RadTreeView runat="server" ID="RadTreeView1" 
                   DataSourceID="SqlRegionEcole" DataFieldID="id" 
                   DataFieldParentID="parentId" CheckBoxes="true" TriStateCheckBoxes="true"  CheckChildNodes="true"
                   DataValueField="Luc" Skin="Sunset">
                           <telerik:RadTreeNodeBinding TextField="Name" />

    With this i code i get all the name that are selected :
    But i don't want the FullPath i need the ID that is selected

    Protected Sub ShowCheckedNodes(ByVal treeView As RadTreeView)
            Dim message As String = String.Empty
            Dim nodeCollection As IList(Of RadTreeNode) = treeView.CheckedNodes
            For Each node As RadTreeNode In nodeCollection
                      message += node.FullPath + "<br/>"
            Label4.Text = message
        End Sub
        Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
        End Sub

  2. Luc Émond
    Luc Émond avatar
    26 posts
    Member since:
    Jun 2010
  3. DevCraft R3 2016 release webinar banner
  4. Veronica
    Veronica avatar
    1213 posts

    Posted 29 Mar 2011 Link to this post

    Hi Luc Émond,

    I'm glad that you were able to find the solution on your own.

    Please feel free to ask me if you have further questions.

    Veronica Milcheva
    the Telerik team
Back to Top