473,566 Members | 3,309 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3265
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.co m

"benji" <be***@discussi ons.microsoft.c omwrote in message
news:DF******** *************** ***********@mic rosoft.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.exte nsions.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.co m

"benji" <be***@discussi ons.microsoft.c omwrote in message
news:DF******** *************** ***********@mic rosoft.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
5948
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. I would like to assign each control to a listview object, however I get a type mismatch. Further investigation reveals that the type of the control...
5
3260
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 Application when various things occur in the package so I have written some custom events to reraise the events caught in the PackageEventsSink class. ...
1
3441
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 records in a database. A Treeview in the left pane, a Listview in the TopRight Pane, and a PropertyGrid in the BottomRight; The Treeview will allow...
5
5838
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 all the answers, so here it is.. I'm trying to create a custom listview that uses custom listviewitems. The listviewitems persist just fine in design...
0
744
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 my custom control, and enter data, but when I close and reopen the dialog, all the columns that I added are gone. I also tried the following,...
1
5662
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 is my code, but icon is not apperead with that code. Source code
5
2511
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) class. How do i get my NewListView class to accept NewListViewItems into and return NewListViewItems from the Items collection.
3
2389
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 tooltiptext of subitems (without the use of a very inconveniant work around). -Inability to display images in subitems (without using the windows api
5
9519
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 IEnumerable<to the ListView's Datasource property. This all works fine to display the first 3 items (the DataPager is set to display three items at a time), but...
0
7673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8109
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7645
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7953
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6263
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5485
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2085
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1202
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.