bind a dynamically created dataTable to a repeater

  • Thread starter Thread starter Frank
  • Start date Start date
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
 
The datagrid should work.

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

Make sure you set the autogeneratecolumns to true.

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

Thanks a lot.
Frank
 
Back
Top