bind a dynamically created dataTable to a repeater

Discussion in 'ASP .Net' started by Frank, Jul 15, 2003.

  1. Frank

    Frank Guest

    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
     
    Frank, Jul 15, 2003
    #1
    1. Advertising

  2. The datagrid should work.

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

    Make sure you set the autogeneratecolumns to true.

    bill

    "Frank" <> wrote in message
    news:...
    > 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
    >
    >
     
    William F. Robertson, Jr., Jul 15, 2003
    #2
    1. Advertising

  3. Frank

    Frank Guest

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

    Thanks a lot.
    Frank

    "William F. Robertson, Jr." <> wrote in message
    news:...
    > The datagrid should work.
    >
    > DataGrid1.AutoGenerateColumns = true;
    > DataGrid1.DataSource = values;
    > DataGrid1.DataBind();
    >
    > Make sure you set the autogeneratecolumns to true.
    >
    > bill
    >
    > "Frank" <> wrote in message
    > news:...
    > > 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
    > >
    > >

    >
    >
     
    Frank, Jul 15, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. J. Babe
    Replies:
    1
    Views:
    8,356
    Kevin Spencer
    Aug 15, 2003
  2. John Crowley
    Replies:
    0
    Views:
    730
    John Crowley
    Jan 14, 2004
  3. =?Utf-8?B?Sm9obiBDcm93bGV5?=
    Replies:
    3
    Views:
    3,160
    vpdsouza
    Feb 1, 2006
  4. Fredrik Rodin

    Sort a datatable and create a new datatable

    Fredrik Rodin, Feb 16, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    9,060
    paul.mariotti
    Sep 28, 2007
  5. msimmons
    Replies:
    0
    Views:
    497
    msimmons
    Jul 16, 2009
Loading...

Share This Page