Unknow number of columns in repeater

  • Thread starter Thread starter Antonio Maciel
  • Start date Start date
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
 
The DataGrid control would work well for this. It can
build the columns for you dynamically at run time.
 
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
 
Yes.
One way would be to use the OnItemDataBound event of each row to examine the
columns and format the text as needed.
 
Back
Top