467,074 Members | 849 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,074 developers. It's quick & easy.

Customised web controls in a data list/repeator

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

Nov 18 '05 #1
  • viewed: 1321
Share:
2 Replies
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" <st****************@livenowpaylater.co.uk> wrote in message news:%2******************@TK2MSFTNGP10.phx.gbl...
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


Nov 18 '05 #2
Shall give that a go, thanks
"Raterus" <ra*****@spam.org> wrote in message
news:ez**************@TK2MSFTNGP09.phx.gbl...
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" <st****************@livenowpaylater.co.uk> wrote in message
news:%2******************@TK2MSFTNGP10.phx.gbl...
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

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Alfredo Barrientos | last post: by
1 post views Thread by muthu | last post: by
2 posts views Thread by NH | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.