Professional Web Applications Themes

Unknow number of columns in repeater - ASP.NET General

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...

  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. #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

  3. #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" <SteveOrr.net> wrote in message
    news:047301c340d5$05109390$a101280aphx.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

  4. #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" <antmacconsys.com> wrote in message
    news:%23iUxqjNQDHA.2460TK2MSFTNGP10.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" <SteveOrr.net> wrote in message
    > news:047301c340d5$05109390$a101280aphx.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

Similar Threads

  1. Unknow name of columns
    By Algoro in forum Coldfusion Database Access
    Replies: 2
    Last Post: September 26th, 12:40 PM
  2. How to the get to number of retrieved columns?
    By Roman Klimkowicz in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: September 18th, 11:30 PM
  3. How to get the number of retrieved columns when doing a SQL Query
    By Roman Klimkowicz in forum ASP.NET Data Grid Control
    Replies: 4
    Last Post: September 16th, 01:15 PM
  4. Displaying number of data items in a Repeater using the DataBinder
    By Tomasz Zaniewski in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: December 6th, 03:24 PM
  5. number of columns
    By atse in forum ASP
    Replies: 16
    Last Post: October 8th, 03:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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