Winforms Grouping Gridview
Is there anyway to create a grouping GridView in c# Winforms. for example I have the following data coulmns:
Manager name : Number of reportees : Reporting Manager开发者_开发知识库 name : DesignationI want this to be grouped based on designation as follows:
Project Manager Manager name : Number of reportees : Reporting Manager name Associate Project Manager Manager name : Number of reportees : Reporting Manager nameI have all the data in say Manager Collection.
I don't think the standard DataGridView
will do what you want. Infragistics has an UltraGrid
control that has support for "group by", which sounds like what you want, but their controls are not free.
I don't think you're missing any functions of the control that will do that for you, I think you need to find a way to use the controls you have to do what you want.
For example, from your 4-col grid, if they click on a cell with a designation 'project mgr', you can open/switch to your 3 col grid with all project manager details.
The following post has provided with a great sample.
http://blogs.vbcity.com/hotdog/archive/2008/12/19/9226.aspx
精彩评论