Unknow number of columns in repeater

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

  1. #1

    Default Unknow number of columns in repeater

    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


    Antonio Maciel Guest

  2. Similar Questions and Discussions

    1. Restricting number of columns in grid
      Dear All I am loading the data from xml and it is loaded to dataset. Now I want to display only one field from dataset to datagrid. In design I...
    2. Unknow name of columns
      Hi there, I am new to CF, and I am interested, if it is possible to iterate through db results, if I don't know names of fields. I think example...
    3. How to the get to number of retrieved columns?
      Hello everyone, i just implement an own search site in MS CRM 1.2, which searches in a MS-SQL database. My question is, how to get the number...
    4. Displaying number of data items in a Repeater using the DataBinder
      Hi, Does anyone know of a method to read the number of items in a repeater and display it in each item in the repeater. I want to display...
    5. number of columns
      Hi, How can I know the number of columns of the .csv files? I want to import them to the database. Thanks. Atse
  3. #2

    Default Unknow number of columns in repeater

    The DataGrid control would work well for this. It can
    build the columns for you dynamically at run time.

    --
    I hope this helps,
    Steve C. Orr, MCSD
    [url]http://Steve.Orr.net[/url]

    >-----Original Message-----
    >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
    >
    >
    >.
    >
    Steve C. Orr MCSD Guest

  4. #3

    Default Re: Unknow number of columns in repeater

    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

    "Steve C. Orr MCSD" <Steve@Orr.net> wrote in message
    news:047301c340d5$05109390$a101280a@phx.gbl...
    > The DataGrid control would work well for this. It can
    > build the columns for you dynamically at run time.
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD
    > [url]http://Steve.Orr.net[/url]
    >
    >
    > >-----Original Message-----
    > >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
    > >
    > >
    > >.
    > >

    Antonio Maciel Guest

  5. #4

    Default Re: Unknow number of columns in repeater

    Yes.
    One way would be to use the OnItemDataBound event of each row to examine the
    columns and format the text as needed.

    --
    I hope this helps,
    Steve C. Orr, MCSD
    [url]http://Steve.Orr.net[/url]


    "Antonio Maciel" <antmac@consys.com> wrote in message
    news:%23iUxqjNQDHA.2460@TK2MSFTNGP10.phx.gbl...
    > 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
    >
    > "Steve C. Orr MCSD" <Steve@Orr.net> wrote in message
    > news:047301c340d5$05109390$a101280a@phx.gbl...
    > > The DataGrid control would work well for this. It can
    > > build the columns for you dynamically at run time.
    > >
    > > --
    > > I hope this helps,
    > > Steve C. Orr, MCSD
    > > [url]http://Steve.Orr.net[/url]
    > >
    > >
    > > >-----Original Message-----
    > > >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
    > > >
    > > >
    > > >.
    > > >
    >
    >

    Steve C. Orr, MCSD 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