Groups | Blog | Home
all groups > asp.net webcontrols > october 2003 >

asp.net webcontrols : repeater


AJ
10/13/2003 2:00:48 PM
Hello,
I have a repeater control data binded to an sqldatareader.
There are a total of 10 columns. Of the 10 columns I only
want to show the first 3 columns once at the top of the
table and the rest of the columns displayed per row.

How do I do that? Am I using the wrong control?

I tried <HeaderTemplate> but it doesn't work.

thanks,
michmo NO[at]SPAM online.microsoft.com (
10/14/2003 9:36:56 PM
Hi AJ,

All the data controls (repeater, datagrid...) will show all your columns on
every row. I suggest that you run two queries. One to get the first three
columns and another to get the other seven. Then use some text boxes above
your repeater for the first three columns and finally bind the repeater to
the data with seven columns.

Thank you, Mike
Microsoft, ASP.NET Support Professional

Microsoft highly recommends to all of our customers that they visit the
http://www.microsoft.com/protect site and perform the three straightforward
steps listed to improve your computer’s security.

This posting is provided "AS IS", with no warranties, and confers no rights.


--------------------
[quoted text, click to view]
AJ
10/16/2003 6:58:39 AM
Thanks,

I actually found a way to do it in one query. I just set
the columns that I want to show once as visible=false.

Then I sync'd with the repeaters prerender event. And set
my labels outside of the repeater to the table cells that
are visible.

aj

[quoted text, click to view]
AddThis Social Bookmark Button