Currently we have a WPF application being built in C# using Visual Studio 2010. There is a combo box that has check-boxes in it, but we would like there to be a select/deselect all option. This would be essentially the same as what you see in the auto-filter drop-downs in MS Excel 2007/2010, where you can select all checkboxes or deselect all checkboxes. The combo box is populated from a field in a SQL Compact Database, whose records depend on the value selected in another combo box (so the other combo box acts as a filter for which values you would see in this drop-down).
This feature has been on our plate for months, but the technical team keeps pushing back for the next release because they say it's too difficult to implement. I'm the business analyst on the application, not the actual programmer, but I figured I would come here to elicit some help.
Is this really something that is difficult to achieve (as in, it would take at least a week to implement)? What would be the way to go about achieving this?
Here's a solution from someone on MSDN. I created a new WPF project to try it out... it works. You can check individual checkboxes. If you check or uncheck the Select All option, all other checkboxes are checked or unchecked accordingly. Took about 5 minutes to create and test.
Of course, it may be that your team has overridden the functionality of the control in some way or they'll hit some other limitation and not be able to implement this, but the combobox should support it.
Related
I am experiencing a really odd behaviour in a windows forms application I am programming in .NET Framework 4.8. I have tried creating a new project with a windows form just containing a CheckedListBox and I can recreate the same behaviour as in my original project. I have also created a new project with .NET Core 6.0 and can recreate the same behaviour yet again.
The behaviour is recorded here: https://youtu.be/md4SN6kTLFs
In words, I have chosen to use the CheckedListBox with the attribute CheckOnClick, which should check or uncheck the checkbox of the item I am selecting. This works if I select the different items slow enough. If, however, I select them with too fast a pace, the selection will not update and the check/uncheck operation will be executed on the item last selected.
I have similar problems with the checkboxes of TreeView, where the selection isn't updated correctly while selecting items too fast.
I have tried creating the same kind of project on another of my computers and I can not recreate the behaviour there. I am at a loss as to how to proceed with fixing this error. I am worried that I have a greater problem with my development environment and need to find out where the problem is. I don't have a problem switching over to WPF or something like that, but I really would like to get to the bottom with what is happening here.
I have the master details "pattern" in a windows form.
For example, I have a bill (master) with a list of items (details) the user will add.
However, the user will add the items manually.
In order to achieve this, I used the data repeater but it caused a lot of problems when the scroll appears.
I spent several hours trying to fix this issue (the selected value in the combobox in the repeater gets mixed as the user scrolls down).
Are there any other controls anyone ever used for the same purpose?
I don't thing the DataGridView will provide me with the same flexibility.
Also building a complete set of dynamic controls is a huge overload.
Suggestions?
Note: I m using .net framework 4.5
I am looking into developing a GUI that will switch the controls based on the value of the selected combo box item.
I have tried adding a different canvas or grid to the gui designer in visual studio but it comes hard to manage as everything overlaps each other in the designer and is hard to know what's what.
Is there an easy way that I can do this, is there a particular control that makes this easy to achieve. I don't really want code the gui in c# and not use xaml.
What I was hoping to do is that all the controls are in there own panel and when the combo box value is changed one panel is removed or hidden and the other is shown.
How can something like this be achieved.
Thanks for any help you can provide
You could implement each different "mode" as a separate UserControl.
Then have a shell with the combobox, where the combobox OnChange will swap out what UserControl is plugged into the shell.
Any other totally common components such as OK/cancel buttons could be part of the shell.
A completely alternative implementation to consider is a tabbed approach, but that probably only flies if it makes sense for the user to act on several of them.
What will you do if the user selects A in the combo, makes changes in UserControlForA, and then selects B in the combo? Could be an annoying corner case, and if this is production code the sort of thing that you'll get future user requests to change how it works.
If you're sure of the design go for it. If not, I'd play around with a few apps and try to find a nice example of the same sort of thing, and consider how they approached it.
But techwise I think a UserControl is what you're describing.
(Edit: crud just saw the xaml/wpf in the question, not sure this is correct in that context, clueless there)
You can use DataTemplate for each different mode.See Different item template for each item in a WPF List for more information.
I want to use a treeview control in my asp.net project and when i drag and drop anything, it should update database. and there should be sort, when I change the sort when I drag and drop, the order column should be changed at the database.
(It is clear that treeview will get the items from database.)
I would search for examples of this via google to see what options are available with the standard .NET components, and 3rd party components (commercially purchased and jquery style plugins) See which one best fits your need and have a go at implemneting what you need. If you have further problems, let us know.
I've seen some for web using javascript, but I am looking for a Windows Form control that is a ComboBox that when opened displays a list of checkboxes and labels, allowing to select one or more, with a "Select All" option.
Would like a non-commercial solution.
I hate to suggest a commercial solution, however, I am using the DevExpress Winforms suite and it has exactly what you are looking for. Plus it really let's you really customize it (as you see in the example below).
why can't you build your own checked comboBox by integrating a label, button and a checked listbox?