|
-
August 29th, 2012, 08:52 AM
#1
[RESOLVED] [VS 2010 .NET] Add Sorting & Grouping to Listview
I am having difficulties finding relevant information regarding listview sorting and grouping. The following picture shows the listview I am trying to sort/group.
Listview.jpg
I am attempting to group not only by "Part Type" but by also to group certain part choices together (when a motor part is chosen that parts as well as matching motor parts to complete the setup are pulled from the DB and these should be grouped together by each choice rather than by "Part Type").
I have tried MSDN, CodeGuru, DreamInCode, and have Googled the topic for 2 days but have not found a relevant example for databound item listview grouping/sorting.
If you have any leads for me they would be greatly appreciated.
Thanks!
-
August 29th, 2012, 11:35 AM
#2
Re: [VS 2010 .NET] Add Sorting & Grouping to Listview
If a Listview had GROUPING built-in, you'd find millions of samples, right? You might need to re-think the control that you are using, or at least not BIND it to any data source.
-
August 29th, 2012, 12:45 PM
#3
Re: [VS 2010 .NET] Add Sorting & Grouping to Listview
Listviews do have grouping and I have found samples that group by using IComparer class but never for databound items. The databinding is unavoidable and I don't know what other control I would be able to use as a suitable substitute. I was trying to figure this out rather than possibly destroying a week and a half of work. But it seems as if I have gone in over my head.
-
August 29th, 2012, 02:00 PM
#4
Re: [VS 2010 .NET] Add Sorting & Grouping to Listview
That would be SUB-CLASSING the LV, or in essence, creating your own LV w/additional properties. You *could* probably create a USER-CONTROL that had all the properties wrapped into one, like I was hinting at before.
-
August 29th, 2012, 02:32 PM
#5
Re: [VS 2010 .NET] Add Sorting & Grouping to Listview
I will have to find a workaround. I fear that creating my own control will be a waste of time for me as I would be learning as I go.
Thank you for your help dglienna.
-
August 29th, 2012, 05:00 PM
#6
Re: [RESOLVED] [VS 2010 .NET] Add Sorting & Grouping to Listview
-
August 30th, 2012, 08:23 AM
#7
Re: [RESOLVED] [VS 2010 .NET] Add Sorting & Grouping to Listview
Thank you, that's good to know. But I have decided to go a different route (no listview) to get the product my boss wants.
Cheers!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|