TreeViewComboBox

Answered
0
0

Hi

I am programmatically adding a tree of nodes to a TreeViewComboBox (Wise J out of box control)

I have noticed that the statement

((TreeView)this.tvcmbServiceList.DropDownControl).CollapseAll();

Does not collapse the nodes.

Also you can manually collapse / expand nodes in the Treeview dropdown unless you have previously selected them.

A previously selected node cannot be collapsed.

Are these Bugs?

Thanks

 

  • You must to post comments
Best Answer
0
0

Hi Ewan,

#2472 is fixed in our latest Wisej development build (2.2.21).

Best regards
Frank

  • Ewan Walker
    Hi Frank Fixed thanks
  • You must to post comments
0
0

Hi Ewan,

I wasn’t able to replicate the CollapseAll() issue with the latest version of Wisej. Which version of Wisej are you using?

Could you please attach a small sample and / or video of the issue?

Best regards,

Levie

 

  • You must to post comments
0
0

Hi Levie

I am using the latest version 2.2.18.0

I am trying to implement the ability to type into the combo to search the tree.

When I programmatically set the selected node. you cannot collapse the node even if you try and do it within the drop down.

See highlighted line.

private void tvcmbServiceList_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 27)
{
//Cancelled();
}
else if (e.KeyChar == 8 && strSearch.Length > 0)
{
strSearch = strSearch.Substring(0, strSearch.Length – 1);
tvcmbServiceList.Text = strSearch;
}
else if (e.KeyChar == 13)
{
((TreeView)this.tvcmbServiceList.DropDownControl).CollapseAll();
TreeNode Node = SearchNode(strSearch, tvcmbServiceList.Nodes[0], true);
((TreeView)this.tvcmbServiceList.DropDownControl).SelectedNode = Node;
strSearch = “”;
}
else
{
strSearch = strSearch + e.KeyChar;
tvcmbServiceList.Text = strSearch;
}
}

Thanks

Ewan

  • You must to post comments
0
0

When you select a node it will automatically expand all the parent nodes.

  • You must to post comments
0
0

Hi Luca

From my tests CollapseNode() just collapses the top level node, as if you re-expand the top level node, the previously expanded nodes are still expanded.

Once you programmatically select a node that is several levels down, you can no longer collapse that branch even if you select a different node.

If you manually select a node you can collapse each node in the chain.

See video

https://1drv.ms/u/s!AnsMoCQkVNQtsW8QoiD1VKeXMKc2?e=y826u6

Thanks

Ewan

  • Luca (ITG)
    CollapseNode() only collapses the single node, that’s correct. You cannot collapse the node containing the selected node, that is also correct.
  • Luca (ITG)
    Actually I’m wrong. It works fine. I can select a node and then collapse the parent. Expanding the parent will show the child still selected.
  • Luca (ITG)
    CollapseAll() seems to collapse only the top level nodes, is that the issue?
  • Luca (ITG)
    I can reproduce. Thanks!
  • Ewan Walker
    So Collapse(all) just collapses at the top level not every expanded node? When you programmatically select a node it locks part of the tree so you can no longer collapse it? This is what I am finding
  • You must to post comments
0
0

Hi Ewan,

this issue is logged as #2471 and will be fixed in our next release.

Best regards
Frank

  • Frank (ITG)
    Hi Ewan, #2471 is included in the latest Wisej release (2.2.19). Best regards, Frank
  • You must to post comments
0
0

Hi Frank

Collapse is fixed (except when nodes are locked see below)

However programmatically selecting a node is not.

The tree auto expands to the node, but the nodes leading to the selected node remain locked as expanded, even if another node is selected.

(If a node is manually selected you can open the drop down and manually collapse all nodes leading to selected node, collapse also works correctly)

Thanks

  • Frank (ITG)
    Hi Ewan, do you happen to have a test case for us ? TIA, Frank
  • Ewan Walker
    Hi Frank no, however the video demonstrates it. we could do a Teams session if that helps
  • You must to post comments
0
0

Hi Ewan,

thanks, logged as #2472.

A fix will be included in the next Wisej build.

Best regards
Frank

  • You must to post comments
Showing 8 results
Your Answer

Please first to submit.