RadTreeView checkbox checked/unchecked on page_load

2 posts, 0 answers
  1. Joseph
    Joseph avatar
    29 posts
    Member since:
    Jun 2014

    Posted 16 Dec 2014 Link to this post

    I was able to create a radtreeview using your example with checkboxes.  Now i need to check and uncheck certain values on first page load in vb.  Please advice.  Below is my code.  Thank You.

    <div id="divMnuLeft">
       <telerik:RadTreeView ID="lstMenuItem1" CheckBoxes="true" TriStateCheckBoxes="true" CheckChildNodes="true" runat="server">
       <DataBindings>
              <telerik:RadTreeNodeBinding Expanded="true" />
       </DataBindings>
      </telerik:RadTreeView>
    </div>
    Private Sub Populate_tblMenuItems1()
            Dim dt As New DataTable
            Dim con As New clsSQLConnector
     
            dt = con.GetWebUserMenuItem(2, ViewState("WebUserID"))
            If dt Is Nothing = False Then
                If dt.Rows.Count > 0 Then
                    lstMenuItem1.DataTextField = "Descr"
                    lstMenuItem1.DataFieldID = "menuID"
                    lstMenuItem1.DataFieldParentID = "ParentID"
                    lstMenuItem1.DataSource = dt
                    Dim binding As New RadTreeNodeBinding
                    binding.CheckedField = "isAssigned"
                    binding.Checkable = True
                    lstMenuItem1.DataBindings.Add(binding)
                    lstMenuItem1.DataBind()
                    'For Each dr As DataRow In dt.Rows
                    'Next
                End If
            End If
        End Sub

  2. Joseph
    Joseph avatar
    29 posts
    Member since:
    Jun 2014

    Posted 18 Dec 2014 Link to this post

    Nevermind figured it out.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top