Datagrids vs. Table Controls


D

dan.benge

Hi there,

I have to build an ASP report that has a one-to-many relationship in
it. For each row of data, there will be a comment column that can have
many comments.

I will only display about the first 50 characters of the comments.
Each comment should be a hypertext time stamp which will take them to
another page to view the entire comment.

Is there any way to customize a datagrid so that I can place more than
one row of data within a single cell? Meaning, I need to be able to
show one or more lines of comments for each row in a single cell...like
this:


Row_1| Row_2 | Row_3 | Row_4
 
Ad

Advertisements

J

john_teague

Nest another datagrid or some type of repeater in your comment columns
to show multple comments for a row.
 
H

Hanover

So I'm assuming that would mean using whatever the event the datagrid
fires off when it draws each row?
 
Ad

Advertisements

J

john_teague

I can't tell exactly what your referring to in your last post. If you
are referring to binding the nested grid to its data, there are several
options. If you are using datasets, you can add a relation to two
datatables and use the DataView.GetChildRows Here is an article about
using repeaters using this.

http://support.microsoft.com/kb/q306154/

You can also do this in the ItemDataBound event like you are referring
to. If you're using an object model then ItemDataBound is the way to
go.
 

Top