Dear all,
I am trying to display a list of user settings in an UltraWinGrid. What I require is two level of nodes, section and sub-section, under which there are rows of the same options (which involves a combo box and check boxes). Basically I am needing to combine an UltraTree and an UltraWinGrid.
By setting the ViewStyleBand to be OutlookGroupby I am able to get the desired look, however I'd like to prevent the user from altering the grouping i.e. hide the bit to which you drag the columns and I'd also like to have a 'summary' row for each subsection and section to allow the user to set all the check boxes\combo selections within that region. The options within the combo box are always the same as are the selection of checkboxes available.
I think now I may be barking up the wrong tree and that what I want to do is not possible, but using an UltraTree produces ugly looking results by comparison. The summary functionality whilst good does not, as far as I can see, allow me to put in a check box or a combo box.
Clearly what I want is possible, but how?
Thanks in advance.
Hello there,
You could get rid of the GroupBy area by setting the Hidden property of the GroupByBox to true, like this:
ultraGrid1.DisplayLayout.GroupByBox = true;
As to the summaries and the setting of all checkboxes of the combo I need a screenshot which illustrates it.
Thank you in advance!
Here is the other image, I forgot to attach
Hi,
If I understand you correctly, what you want is an extra row at the top of each collection of rows which acts as a sort've special row that affects all of the rows below it.
There's no simple way to do this in the WinGrid. All of the rows in a collection have to be the same and they have to exist in the data source.
So, theoretically, you could set up your DataSource with a couple of extra rows that correspond to each group. Then you would have to deal with what happens when the user changes a value in these special rows. That's not a trivial undertaking in itself, but it gets more complicated, because, depending on what features of the grid you are enabling, you might also have to deal with keeping these special rows visible when filtering (not very difficult, you just handle the FilterRow event). You would also have to deal with Sorting, which could be handled by a SortComparer, but is a bit more complicated.
So you would have to jump through quite a few hoops to get this working the way you want.
Oh... one thing I forgot to mention. If all you need is a Check/uncheck all, then you could do this by placing checkboxes in the column headers. The grid supports this natively in the latest version. It does not have any support for showing a dropdown list or doing more complex editing in the column headers, though.
Thanks for that Mike, sounds like it would be too much work in the time I have.
Is there any other way I could achieve what I'm after, without using the GroupBy functionality? i.e. basically a treeview combined with an ultragrid and the ability to set values for all child nodes when it's parent node value is set.
Hello,
Please let us know if you face any issues with implementing that with the tree by opening a new forum thread in the Tree section.
I'll give it another bash without binding
I think my problem was that I was binding the tree to the datasource, which is flat in nature, and was having trouble getting the 'parent' nodes correct
Seems like this should be doable in the tree, but you mentioned you tried that and couldn't get it to work. What's the problem with using the tree? The tree is more flexible, since you can add the nodes in manually and you don't have to use data binding. You could even add the category nodes yourself and then bind the child list.
What about via an UltraTree Mike? The summary nodes were only a way to get the set all functionality when doing a group by.
Essentially the same as the VS2010 exceptions settings window is what I'd like (see the attached image). A tree structure (with 3 levels) and for each node/leaf a series of check boxes and a combo box. As shown in the image a node check box reflects the status and sets the child nodes setting. If that was easily achievable for a combo box then great but to program that by hand wouldn't be too hard.