c# - Grouping by non-column in objectlistview -
i have 5-6 rows of info need display, when add together info i'd able sort info in 4 different sections , none of these grouped column value getting grouped sql value etc.
how do objectlistview?
its pretty straightforward standard listview:
listview1.items[0].group = listview1.groups[0]; i can't seem figure out in objectlistview though.
thanks.
adding code:
public class adminhistory { public string ordernr { get; set; } public string newimei { get; set; } public string imei { get; set; } public string fel { get; set; } public string modell { get; set; } public string garanti { get; set; } public string datum { get; set; } public string user { get; set; } public string status { get; set; } } private void admin_load(object sender, eventargs e) { list<adminhistory> list = new list<adminhistory>(); list.add(new adminhistory() { ordernr = "12345", newimei = "", imei = "test", fel = "test", modell = "abc", garanti = "ja", datum = "2014-01-01 18:31", user = "123", status = "waiting"}); adminhistory.setobjects(list); } my objectlistview has propper aspectnames.
basically don't want grouping of fields above, want able create virtual grouping , grouping lot of info 4 separate groups, these groups displayed in listview , user may view them he/she wishes.
example image creators of objectlistview: http://www.codeproject.com/kb/list/objectlistview/fancy-screenshot2.png
the grouping in image not grouping column, (i think atleast) rather virtual grouping i'm trying achive.
the grouping in image not grouping column, (i think atleast) rather virtual grouping i'm trying achive.
the illustration grouped columns aspect value. additionally uses "grouping ratings" feature using groupcolumn.makegroupies.
as far know, grouping bound column. however, accomplish want little workaround.
"the crucial part understand model objects have same “key” placed in same group. default, “key” aspect of model object calculated grouping column."
you can homecoming own "group key" installing groupkeygetter delegate, property bound column. however, utilize "spare" column of selection , install groupkeygetter , homecoming desired "key" anything.
mysortcolumnofchoice.groupkeygetter = delegate(object rowobject) { var key = /* create key here */ homecoming key; }; then utilize
objectlistview1.buildgroups(mysortcolumnofchoice, sortorder.none); to create grouping using "custom" key.
c# grouping objectlistview
No comments:
Post a Comment