Hey there...
Once again, i'm having problems with databinding...
i'm binding from a SQL server. Some nodes must be checked and some dont.
Who rules it is the MenuStat field.
My whole binding code:
Code: Visual Basic.NET
da.Fill(ds2, "Menus")
Dim r As DataRelation = ds2.Relations.Add(ds2.Tables("Menus").Columns("MenuCodi"), ds2.Tables("Menus").Columns("MenuPaiX"))
r.Nested = True
binding = New DataBinding
binding.DataField = "MenuDesc"
binding.Property = "Text-Html"
tvMenus.Bindings.Add(binding)
binding = New DataBinding
binding.DataField = "MenuCodi"
binding.Property = "ItemID"
tvMenus.Bindings.Add(binding)
binding = New DataBinding
binding.DataField = "MenuStat"
binding.Property = "Checked"
tvMenus.Bindings.Add(binding)
tvMenus.DataSource = ds2
tvMenus.DataBind()
Tried changing the property to CheckState, but all fields got checked.
MenuStat tried True/False, 1/0, Checked/Unchecked
How can I do this???
Don't want to bind it with datareader, item by item...
tks...