Unknow number of columns in repeater

A

Antonio Maciel

Hi.

I have a datatable created at runtime that I want to display using a
repeater control. The problem is that the number of columns of the datatable
can vary. Is there any way to configure the itemtemplate section of the
repeater to display data for an unknow number of columns?

Thanks,

Antonio Maciel
 
S

Steve C. Orr MCSD

The DataGrid control would work well for this. It can
build the columns for you dynamically at run time.
 
A

Antonio Maciel

Hi Steve.

Can I control the styles used on each row or cell when using a Datagrid? My
main problem is that I need to define a lot of styles for the cells being
returned.

Thanks,

Antonio Maciel
 
S

Steve C. Orr, MCSD

Yes.
One way would be to use the OnItemDataBound event of each row to examine the
columns and format the text as needed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Staff online

Members online

Forum statistics

Threads
474,078
Messages
2,570,570
Members
47,204
Latest member
MalorieSte

Latest Threads

Top