![]() If interest exists, I will add that later on, including its quick filter options.Īnother note: The library also contains some searchboxes (for DataGridView/ Treeview and bindingsource in general. However, the context menu is a bit too integrated in the library and its custom ORM to quickly add here. One of the things still missing here is a quick grouping context menu item, which sets the grouping on the column where the right click took place and is the way grouping is used most in the applications I've used so far. The class library is an extract from a larger control library. ![]() The snippet above would produce something like: ![]() grouper.DisplayGroup += grouper_DisplayGroup void grouper_DisplayGroup( object sender, GroupDisplayEventArgs e)Į.BackColor = (e.Group.GroupIndex % 2) = 0 ? Color.Orange : Color.LightBlue Į.Header = ", grp: " + e.Group.GroupIndex Į.DisplayValue = " Value is " + e.DisplayValue Į.Summary = " contains " + e.Group.Count + " rows" The DisplayGroup event can be used to further customize whatever has to be shown: And a DisplayGroup event which is fired whenever one of the grouping rows is being painted. The component exposes a GroupingChanged event to catch when the grouping was changed or removed. default sort order for the groups is ascending, // you can change that in the options as well (ascending, descending or none) if you don't want the grouped column name to be repeated in the headers: if you don't want the (rowcount) to be shown in the headers: ![]() to collapse all loaded rows: (the difference with setting the option above, // is that after choosing a new grouping (or on a reload), the new groups would expand. to start with all rows collapsed on a (re)load or // when the group is changed you can set the option startcollapsed: ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |