Customised web controls in a data list/repeator

Discussion in 'ASP .Net' started by Steve Lloyd, May 19, 2004.

  1. Steve Lloyd

    Steve Lloyd Guest

    Hi there,

    I have a set of products each of which has attributes (color size etc), is
    it possible to use a data list or repeator to display all the items and
    provide combo box with a unique set of attributes in each list/repeator item
    as a sort of sub query.

    Thanks for any help,

    Steve
    Steve Lloyd, May 19, 2004
    #1
    1. Advertising

  2. Steve Lloyd

    Raterus Guest

    Sure, do it in the itemdatabound event. First place an empty radiobutton list where you want it to appear.

    then in ItemDataBound, you'll need to do something like this (This example is for a datagrid, but a datalist/repeater shouldn't be much different)

    If e.Item.ItemType <> ListItemType.Header AND _
    e.Item.ItemType <> ListItemType.Footer then
    Dim rbl as RadioButtonList = e.Item.Cells(0).Controls(0) 'the hard part is figuring out exactly where the radiobuttonlist is in the mess

    rbl.datasource = "whatever"
    ...
    rbl.databind
    End If

    "Steve Lloyd" <> wrote in message news:%23IVzk%...
    > Hi there,
    >
    > I have a set of products each of which has attributes (color size etc), is
    > it possible to use a data list or repeator to display all the items and
    > provide combo box with a unique set of attributes in each list/repeator item
    > as a sort of sub query.
    >
    > Thanks for any help,
    >
    > Steve
    >
    >
    >
    Raterus, May 19, 2004
    #2
    1. Advertising

  3. Steve Lloyd

    Steve Lloyd Guest

    Shall give that a go, thanks


    "Raterus" <> wrote in message
    news:...
    Sure, do it in the itemdatabound event. First place an empty radiobutton
    list where you want it to appear.

    then in ItemDataBound, you'll need to do something like this (This example
    is for a datagrid, but a datalist/repeater shouldn't be much different)

    If e.Item.ItemType <> ListItemType.Header AND _
    e.Item.ItemType <> ListItemType.Footer then
    Dim rbl as RadioButtonList = e.Item.Cells(0).Controls(0) 'the hard
    part is figuring out exactly where the radiobuttonlist is in the mess

    rbl.datasource = "whatever"
    ...
    rbl.databind
    End If

    "Steve Lloyd" <> wrote in message
    news:%23IVzk%...
    > Hi there,
    >
    > I have a set of products each of which has attributes (color size etc), is
    > it possible to use a data list or repeator to display all the items and
    > provide combo box with a unique set of attributes in each list/repeator

    item
    > as a sort of sub query.
    >
    > Thanks for any help,
    >
    > Steve
    >
    >
    >
    Steve Lloyd, May 19, 2004
    #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. Pat Sagaser via .NET 247
    Replies:
    0
    Views:
    2,514
    Pat Sagaser via .NET 247
    May 13, 2004
  2. muthu

    Doubt in repeator control

    muthu, Apr 5, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    343
    Eliyahu Goldin
    Apr 5, 2006
  3. muthu
    Replies:
    0
    Views:
    322
    muthu
    Apr 6, 2006
  4. muthu
    Replies:
    3
    Views:
    1,261
    =?Utf-8?B?Y2xpY2tvbg==?=
    Apr 6, 2006
  5. Jules Mitland
    Replies:
    7
    Views:
    102
    Randy Webb
    Oct 22, 2004
Loading...

Share This Page