PC Review


Reply
Thread Tools Rate Thread

DataList - How to programmatically add a separator row

 
 
=?Utf-8?B?VG9ueV9WQkFDb2Rlcg==?=
Guest
Posts: n/a
 
      20th Nov 2007
With ASP.NET 2.0 VB.NET, how do I:

I have a multi-column (4 columns) DataList control on my WebForm that
displays sports teams for our league. The data is grouped by Division Names
where there are 4 teams per Division. When the data is displayed on the Web
Page, it will be a 4x4 (4 columns by 4 rows) grid. What I need to be able to
do is, add a separator row whenever the Division Name changes and display
that Division name such that it spans across 4 columns.

I have a stored procedure that sorts the data by Division name, so the data
is already coming in sorted by Division. All I need to be able to do is
detect when the Division name changes, and then add a new row to the DataList.

I have done something similar using a GridView control and the "Protected
Overrides Sub Render(ByVal writer As HtmlTextWriter)" event, but I can't seem
to find any examples of how to do this with a DataList control.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DataList: How to create a separator that spans across all items robnhood00 Microsoft ASP .NET 2 13th Jul 2006 06:36 PM
Programmatically Adding An Item To The DataList Umut K. Microsoft ADO .NET 6 7th Sep 2003 03:28 PM
Programmatically Adding An Item To The DataList Umut K. Microsoft Dot NET 6 7th Sep 2003 03:28 PM
Programmatically Adding An Item To The DataList Umut K. Microsoft C# .NET 6 7th Sep 2003 03:28 PM
Programmatically Adding An Item To The DataList Umut K. Microsoft ASP .NET 6 7th Sep 2003 03:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:52 AM.