Welcome Guest Search | Active Topics | Sign In | Register

Treeview - Not giving results. Options
Chris Felstead
Posted: Monday, April 6, 2009 9:36:31 AM
Rank: Member
Groups: Member

Joined: 1/21/2009
Posts: 22
Hi EO,

I think I'm missing something with the TreeView control. No matter what I try, I keep getting nothing returned when I lookup what checkboxes are checked. Here's some code.

Code: HTML/ASPX
<eo:TreeView ID="eoTvEstablishments" runat="server" ControlSkinID="None" Width="500px">


This is on the pages submit button

Code: Visual Basic.NET
For Each eoNode As EO.Web.TreeNode In eoTvEstablishments.SelectedNodes
      Response.Write(eoNode.Text & ": " & eoNode.Value & "<br />")
Next

eo_support
Posted: Monday, April 6, 2009 9:52:54 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You may want to use a Label control, then set the Label control's Text property instead of using Response.Write. You can also set a breakpoint in your debugger to see if that got hit.

Thanks!
Chris Felstead
Posted: Tuesday, April 7, 2009 2:05:46 AM
Rank: Member
Groups: Member

Joined: 1/21/2009
Posts: 22
No change. I don't understand it.

Am I using the correct code?
eo_support
Posted: Tuesday, April 7, 2009 12:47:19 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Please create a test page that reproduces the problem. The code you posted is fine, so the problem is somewhere else. If you can create a reproducing page, we will be happy to take a look. Make sure the page runs independently.

Thanks!
Chris Felstead
Posted: Wednesday, April 8, 2009 2:34:16 AM
Rank: Member
Groups: Member

Joined: 1/21/2009
Posts: 22
Sending you a pm now.
eo_support
Posted: Thursday, April 9, 2009 10:08:05 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

We looked into the code that you sent to us. It appears that you misunderstood what SelectedNodes is. SelectedNodes contains all selected, not checked nodes. A selected node is a node that currently is highlighted in blue, it's not related to check state of each node in any way. In order to get a list of all checked node, you will need to walk through all node recursively and check the node's Checked state.

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.