tags:

views:

68

answers:

0

I am trying to bind Generic collection to a Rad Treeview control. In following case CategoryCollection Returns collection of Category Object, which has bunch of properties and A Parent property which is a object and this parent object Has Id and text properties. What I am trying to do is: I want to Bind DataFieldParentID of the tree view to CategoryCollection.Parent.Id. How do I do that? Dim tvCategory As RadTreeView = DirectCast(cboCategory.Items(0).FindControl("tvCategory"), RadTreeView)

    With tvCategory
        .DataSource = CategoryCollection
        .DataTextField = "Name"
        .DataValueField = "ID"
        .DataFieldID = "ID"
        .DataFieldParentID = "Parent.ID"
        .DataBind()
    End With

Thank You