Filtration for List view data upon List view Header column clicks in WINFORMS - winforms

I dont know whether this is possible or not, But i just want your suggestions on this ..
Here is what I would like to be able to do. Not sure if this functionality is built in or if I will need to use a combination of any controls/tools.
I want to be able to filter a listview data.. have it filter the listview accordingly on click of listview columns header.I want to be able to use checkboxes in dropdown of listview header column such that I can filter data easily.
Best Example: Control Panel-->Uninstall a Program ,Where a list of uninstall programs available in listview for computing filtration upon click of any header.
I want this in Windows Forms Applications C# Visual Studio 2010
If solution is possible, pls. share the site links or any free tools also as well.

Here is the same idea for a DataGridView http://www.codeproject.com/Articles/33786/DataGridView-Filter-Popup However, you would have to write the code to do the filtering as a winforms ListView does not supporting binding to a DataTable.

ObjectListView -- an open source wrapper around a .NET ListView -- supports filtering out of the box.

Related

Using DevExpress ChartControl and Data Grid in WPF

How to use Data Grid as data source, and show it to DevExpress ChartControl in WPF? Or, you have alternative solution, to show chart from data grid in WPF?
Although it is possible to bind the DevExpress ChartControl and GridControl to the same view model collection, you can also use the standard WPF binding syntax to link the GridControl to the ChartControl.DataSource property (DataSource="{Binding ElementName=grid, Path=SelectedItems}").
This approach is shown in the "Data Grid Charting" ChartControl demo module from the DevExpress Demo Center. In this case, the chart's layout is automatically updated based on the actual grid selection state.
DataGrid should not be a data source for your ChartControl.
I assume that you using MVVM pattern for WPF application.
If you don't know about MVVM please read:
MVVM: Tutorial from start to finish?
In short your DataGrid from "View" is bind to a data source from "ViewModel" and ChartControl should follow the same principle, it should be bind to a data source from "ViewModel" not DataGrid itself.
Its the same as asking how do I print document from my monitor (you could do this by scanning your monitor and printing :) ).
You don't connect you printer to you monitor in order to print, you use same document as "data source" from your hard drive to display it on monitor as well as print it on printer.
Starting from DevExpress version 15.2, Report Generator tool allows you to generate a report from the DevExpress Grid View.
See the Advanced Grid Printing and Exporting help topic for more details. However, this approach will not work for the standard DataGridView. In this case, you can either use the Report Wizard to bind a report to your DataGridView's data source and generate required layout. Alternatively, you can create the report layout manually. Review the approach described in the How to create a report dynamically article.
For specific to WPF, refer below documentation links:
Grid-Based Report Generation
Please try these solutions and let me know if any of them helps.

Recommended books for wpf custom control design-time features

I have some custom controls that I would like to make more 'user friendly' in Cider (VS wpf designer). I have red all the documentation in MSDN and some sites that I found through google , but I did not find answers to some simple questions :
How to set default values for the items that are created from a collection editor (like columns in datagrid, not drag-drop from toolbox)
How to generate XAML (like the datagrid dose when you click generate columns)
Please let me know if you know of any doc that goes into details such as those mentioned above.
Also if you know/have any custom controls with visible source code that have designer support (like Xceed or DevExpress) please share a link.
Recommended books:
1- www.amazon.com/Pro-WPF-2012-Presentation-Professionals
2- any book about Design Pattern like www.amazon.com/3-0-Design-Patterns-Judith-Bishop
3- MVVM
to add a column to data grid you don't need to generate xaml, there is a column collection you can add one by code behind
dataGrid1.Columns.Add(new DataGridTextColumn{ Header = "column1"});
read the first book well and you will be good
This an excellent and rare book that goes deep into custom controls development:
WPF Control Development Unleashed: Building Advanced User Experiences

Datagrid Edit Windows Form

I have worked in ASP.net before and know that I can edit its equivalent to a datagrid (detail view or something like that?) However, I'm working on a windows form now and i need to use the datagrid. I know there are options to edit each individual cell and when I ran my program, it edited it, but it does not update to the database. I was wondering how I would be able to write a SQL code using ADO.net for the datagrid so I can update certain things (or I can bind the datagrid but maybe there is a build in edit command) thanks!
Databinding is significantly different in WinForms than it is in ASP.NET. There's no request cycle and databinding is always both ways (controls read data from the datasource and automatically update it as well).
However you'll still need to take the data from your datasource and persist it to the database. How you do that depends on what your datagrid is bound to.
I recommend you review this MSDN article Windows Forms Data Binding and the links that matter to you

WPF Autocomplete Combobox Not Saving To Database VB

Trying to create what i feel should be an easy WPF application. basically what i want it to do is have a autocomplete combobox which is bound to a sql db table. the table has 2 fields(Address and Directions)
once the user selects the record from the address combox the directions textbox below will be filled directions stored in the table.
if there are no records in the address combobox the user can then type in the combobox and add the new entry.
there will be a save button on the form that saves the new entry and will be visible in the list. Im new to WPF applications and have been trying to get this to work for weeks. Any help would be appreciated.
I would start by checking out the following discussion which will point you to several good tutorials on using the MVVM (Model-View-ViewModel) pattern with WPF.
MVVM: Tutorial from start to finish?
Other than that, you haven't really given any indication what you've tried and what isn't working so I can't really offer any other advice. But even the simplest applications in WPF are much cleaner and more easily implemented with MVVM than using code behind and drag and drop data binding.

Three State Treeview Windows Forms

One of the frustrations with the standard TreeView is that you can't show a partial selection to indicate that some of the children are selected. A partial selection in a complex tree allows the user to easily determine where the selections are, even if the tree is not completely expanded. A similar idea is used in manu backup programs to allow the user to select the files to be backed up.
Does anyone know of a way to make the checks in a treeview checkbox gray? I want to gray the check of a parent node when some (but not all) of its child nodes are checked. Kinda like what you see when you are selecting options to install during a software installation.
I have seen several post, but is older (2000, 2007 year).
I now, in 2010, the better answer possible is required. I use VS 2008 . Net 3.5 , Windows Forms
I am using this Tri-State TreeView, also from CodeProject. Works just fine - should you need a project more up to date.
There's a nice article on code project about just this. Tri-State TreeView Control

Resources