bind a dynamically created dataTable to a repeater

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default bind a dynamically created dataTable to a repeater

    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 Guest

  2. Similar Questions and Discussions

    1. How do I dynamically bind two components?
      How do I dynamically bind two components with out the use of the components inspector panel? My problem began when I dynamically created an...
    2. Managing ViewState of a dynamically created Custom Composite Server Control -(where the original is also dynamically created)
      Ok here's my scenario. I have a Custom Composite Server Control (CCSC) consisting of a TextBox, Button & Panel. (And some other code - which I...
    3. How to pull the data out from two table and bind to repeater
      HI All, Can somebody help what's wrong with my SQL Query statement when i want to create a join table query. It suppose work perfectly fine, but...
    4. Cannot bind IList returned from a web service to a repeater
      After I retrieved a list of objects (e.g Employees) and put it into a IList (ArrayList) and bind it to a repeater. everything works fine so far. ...
    5. Bind an ArrayList to a Repeater
      This may or may not help. but the TimeTracker Sample App that can be downloaded w/ Source Code on http://www.asp.net uses this on every datagrid...
  3. #2

    Default Re: bind a dynamically created dataTable to a repeater

    The datagrid should work.

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

    Make sure you set the autogeneratecolumns to true.

    bill

    "Frank" <frankw_us@yahoo.com> wrote in message
    news:uzhVhAuSDHA.560@TK2MSFTNGP10.phx.gbl...
    > 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. Guest

  4. #3

    Default Re: bind a dynamically created dataTable to a repeater

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

    Thanks a lot.
    Frank

    "William F. Robertson, Jr." <wfrobertson@kpmg.com> wrote in message
    news:utnfrDvSDHA.2480@tk2msftngp13.phx.gbl...
    > The datagrid should work.
    >
    > DataGrid1.AutoGenerateColumns = true;
    > DataGrid1.DataSource = values;
    > DataGrid1.DataBind();
    >
    > Make sure you set the autogeneratecolumns to true.
    >
    > bill
    >
    > "Frank" <frankw_us@yahoo.com> wrote in message
    > news:uzhVhAuSDHA.560@TK2MSFTNGP10.phx.gbl...
    > > 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 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139