Infragistics Drag and Drop Tree Expand Multiple Nodes Simultaneously - c#

I am using the following Infragistics component for viewing hierarchical data.
http://www.igniteui.com/tree/drag-and-drop-single-tree
I could able to load data correct but the problem is wI cant expand multiple nodes simultaneously. I mean when I expand a node the other node collapsed expanding only the current node. Can some one please suggest if there is any configuration setting I am missing to accomplish this?
I want the nodes once expanded will remain expanded until user collapses it again.
Thanks,
Krishna Prasad

The option that controls that is singleBranchExpand. Set it to false to allow multiple nodes to be expanded at the same time. http://jsfiddle.net/ywtLL7ka/
$("#tree").igTree({
singleBranchExpand: false,
});

Related

Saving and restoring a TreeView state in C#

Consider a large TreeView; some nodes and subnodes are expanded others are collapsed. The user adds a child node to a node and the program saves everything back to the underlying XML file. Then the TreeView rebuilds. The problem is that only the root node is expanded; all other nodes are collapsed.
Has anybody ever seen code (I don't think there's anything built into WPF that does this) that saves the state of the TreeView (which nodes are expanded) and then is able to restore it to this state after a save?
Any ideas?
Edit
Well, that link didn't really help. I'm thinking of creating an array and storing the state of isExpanded and then reading it back after the load.
One has to manage the treeview's states directly and note when a node is expanded or collapsed. Then on load or refresh, open / close the nodes as needed.

How to set threeview node checkbox to mix state i.e. if any of the child node is selected, Parent node should fill in to indicate that

I am working on a windows form application, where I connect to the database and get a list of projects and sub-projects. I am able to show this as a treeview with checkboxes, that later an user can select to do further operations.
My problem is that, I can't set the Parent node state when one of the child nodes is selected. Here, I want some indication, if any of the child nodes is selected the parent node should fill in to show that something has been selected below that parent node.
Okay, meanwhile, I found answer to my problem. Not really wise but thanks to this Simple Tri-State TreeView control. code link here.
I will definitely try to build my own custom version of this. For now, this works fine.

how to remove image from treeview after added

Using visual studios 2010 and c# i have a treeview and i added images to each of the nodes. In retrospect i now want to remove the images that are associated with the children of the 3 main root nodes. How do i remove the images from the children of my 3 main root nodes but keep the images on the 3 root nodes?
I have tried opening the properties for the nodes and changed the ImageIndex and SelectedImageIndex to "none" for all of the children nodes and when i press ok, it still shows the default image for each child node.
Thanks
I'm not sure of it, but I believe that you can pass through every control inside the TreeView doing a foreach in [TreeView].Controls... In there you can search for [control].GetType() == typeof([type_of_the_image]), and do some logic to get just the main ones.
Besides that, you can remove by jQuery, doing something close to what I said above. If these ideas are something that interests you, I can help with the development.

Adding the check boxes in the TREEVIEW in c#

i want to add the check box to the child node of a certain parent node in the tree view in my application...How should i add it?
TreeView has a property with the name CheckBoxes, if set to true, it shows checkboxes for all child nodes.
The TreeView API only allows you to add/remove checkboxes for EVERY node. If that's what you want, then the answer is easy - use the TreeView's CheckBoxes property.
If you want a checkbox for a particular node in the tree only, then it gets tricky. .NET doesn't directly support that. You can get the tree to accept it using Win32 message overrides, see the link below for a solution elsewhere:
http://dotnetfollower.com/wordpress/2011/05/winforms-treeview-hide-checkbox-of-treenode/
You can't show checkboxes only for some TreeNodes - only for all of them or none at all.
To enable the checkboxes for your tree set the CheckBoxes property to true.

move nodes on a treeview control

I am using the standard asp.net treeview control to display a menu structure that is getting bound from a database. The data structure has a parentID column to represent the node relationship if one exists.
Anyway, that's not an issue, I am looking for a treeview control that would allow a user to rearrange the node by dragging them to a new position within the tree. Can anyone point me in the right direction as to any controls out there that can do this? The windows form control has the move node events. IS there something like this for web forms? Any pointers greatly appreciated.
You can have look at ExtJS TreePanel.
Drag and Drop ordering in a TreePanel
Why not try the JQuery TreeView plug-in?
http://plugins.jquery.com/project/treeview
Not sure if meets all of your non-functional requirements, but if you click on the "Try out a demonstration" link, you should be able to see if it meets your needs.

Categories

Resources