Welcome Guest Search | Active Topics | Sign In | Register

TreeView CheckBox Options
Brandon
Posted: Thursday, June 26, 2008 3:27:46 AM
Rank: Member
Groups: Member

Joined: 10/11/2007
Posts: 12
Hi

I have a databing routine on a treeview which works fine there after i do this

Code: Visual Basic.NET
Dim Binding As New EO.Web.DataBinding()
                Binding.DataField = "SecurityBitNumber"
                Binding.Property = "Value"
                tvPermissions.Bindings.Add(Binding)

                Dim Allow As New EO.Web.DataBinding()
                Allow.Depth = 2
                Allow.DataField = "Allow"
                Allow.Property = "Checked"
                tvPermissions.Bindings.Add(Allow)


This first binding works fine for setting the value of the node.
the seond one is where i want to check the node but nothing happens.
Has this got something to do with the depth setting, or do i have to iterate through all nodes and then set the checked value.

Thanks in advance
Brandon
eo_support
Posted: Thursday, June 26, 2008 10:05:06 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,096
Hi Brandon,

I believe Checked is not among the list of properties that can be data bound. In order to data bind to Checked, you can handle the TreeView's ItemDataBound event. Inside that event you can set Checked of the newly created node based on the current record.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.