bind a dynamically created dataTable to a repeater

F

Frank

Hi alll,

How can I bind a dynamically created dataTable to a repeater? I do not know
the number of columns and the column names at design time. I try to do the
same thing as for datagrid:
Repeater1.DataSource = values;
Repeater1.DataBind();
but it does not return anything.

Thanks.
Frank
 
W

William F. Robertson, Jr.

The datagrid should work.

DataGrid1.AutoGenerateColumns = true;
DataGrid1.DataSource = values;
DataGrid1.DataBind();

Make sure you set the autogeneratecolumns to true.

bill
 
F

Frank

Maybe I did not make it clear. It works for datagrid, but not work for
repeater.

Thanks a lot.
Frank
 

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

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top