473,320 Members | 2,035 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

ASP.NET's new ListView Control: Custom Grouping?

Hi,

I'm investigating the new listview control. The grouping functionality is
very cool, but I don't want to simply group every x elements; i'd like to do
custom grouping (I want to say, start a new group if this record contains a
new value for field y as compared to the previous record). What I envision is
handling an event and issuing a command to the control after doing my own
check, saying "ok, start a new group." Is this possible? If not by handling
an event, perhaps via a derrived control? Any thoughts?

Best

-Ben
Jan 2 '08 #1
2 3262
Ben,

Unfortunately, no, it doesn't seem like there is a way to do this.
Which is a shame, really, as I would think it would have been easy to expose
an interface which would be queried as to when a group changes.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"benji" <be***@discussions.microsoft.comwrote in message
news:DF**********************************@microsof t.com...
Hi,

I'm investigating the new listview control. The grouping functionality is
very cool, but I don't want to simply group every x elements; i'd like to
do
custom grouping (I want to say, start a new group if this record contains
a
new value for field y as compared to the previous record). What I envision
is
handling an event and issuing a command to the control after doing my own
check, saying "ok, start a new group." Is this possible? If not by
handling
an event, perhaps via a derrived control? Any thoughts?

Best

-Ben

Jan 2 '08 #2
Hi Nicholas,

Thanks for the reply. That is disapointing. I'd imagine that the code for
the control has something like:

if (currentrow % GroupItemCount == 0)
MarkNewGroup();

I hope someone is able to write a derrived class that modifies this. I tried
to open the assembly system.web.extensions.dll in ildasm but was having
difficulty opening GAC assemblies in the tool.

Thanks for the prompt answer, Nicholas.

-Ben
"Nicholas Paldino [.NET/C# MVP]" wrote:
Ben,

Unfortunately, no, it doesn't seem like there is a way to do this.
Which is a shame, really, as I would think it would have been easy to expose
an interface which would be queried as to when a group changes.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"benji" <be***@discussions.microsoft.comwrote in message
news:DF**********************************@microsof t.com...
Hi,

I'm investigating the new listview control. The grouping functionality is
very cool, but I don't want to simply group every x elements; i'd like to
do
custom grouping (I want to say, start a new group if this record contains
a
new value for field y as compared to the previous record). What I envision
is
handling an event and issuing a command to the control after doing my own
check, saying "ok, start a new group." Is this possible? If not by
handling
an event, perhaps via a derrived control? Any thoughts?

Best

-Ben


Jan 3 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Welie | last post by:
Hi all- I am using a listview (MSComctlLib.ListViewCtrl.2)on an Access form. Actually there are six listviews on the form. I need to do the same thing to all six forms so I have the loop below....
5
by: Simon Middlemiss | last post by:
I am writting a program to manage DTS packages which is based on the code example at the following link http:\\www.support.microsoft.com/?kbid=319985. I need to do things in a Windows Forms...
1
by: newbie | last post by:
Hello, I maybe asking too much in a single posting, but here it goes: I building a windows form that mimic's the Outlook XP GUI. Its a three pane form that will allow a user to view and edit...
5
by: ToddH | last post by:
I know the following code is C#. I'm a vb programmer trying to learn a new language. I posted this in the c# group but never got a response. You guys seem to know alot about all languages and have...
0
by: Scott | last post by:
Hi, I'm trying to write a custom control that exposes a ListView.ColumnHeadersCollection, but I'm having problems working with it. I am able to bring up the column headers collection dialog on...
1
by: Mamatha | last post by:
Hi I have one application ,that diplays data from database into the listview control.While adding data to the listview i want to display an icon to the leftside of the first column's data.Here...
5
by: David Gouge | last post by:
Hi all, Hope this is a simple one for you but i seem to be having a bit of a mental block. I have an inherited ListView (NewListView) class and an inherited ListViewItem (NewListViewItem)...
3
by: Michael.Suarez | last post by:
Is it me, or does it seem like they put no effort into creating the listview control in .Net. listview. A few gripes I have with .Net listview that aren't present in vb6: -Inability to set...
5
by: Mark Olbert | last post by:
How do I get the DataPager and ListView to play nice together when I use a custom datasource? In my webpage, I use linq to pull data from a SqlServer database and assign the resulting...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.