DataList Controls with a DropDownList

G

Guest

Hi,

I've created a shopping cart using DataList control; it has all the usual
command buttons; Add, and Delete. However, I want to add a DropDownList so
that the user can change the product (very small product list) and I want the
SelectedIndexChanged event to be posted back to the Data List's ItemCommand
event.

I've tried added GetPostBackEventReference to the drop down list during the
Data List's ItemCreated event - The form will post back but I cannot get it
fire the ItemCommand event no matter what parameters I use in the
GetPostBackEventReference. I'm not even sure if this is right way to do this.

Any suggestions would be greatly appreciated.
 
G

Guest

Oliver said:
Hi,

I've created a shopping cart using DataList control; it has all the usual
command buttons; Add, and Delete. However, I want to add a DropDownList so
that the user can change the product (very small product list) and I want the
SelectedIndexChanged event to be posted back to the Data List's ItemCommand
event.

I've tried added GetPostBackEventReference to the drop down list during the
Data List's ItemCreated event - The form will post back but I cannot get it
fire the ItemCommand event no matter what parameters I use in the
GetPostBackEventReference. I'm not even sure if this is right way to do this.

Any suggestions would be greatly appreciated.

I did a while ago a similar application using the datagrid.
http://www.societopia.net/Samples/DataGridEventDelegates.aspx

You can adapt it to create a customized DataList that works for your
application.
 
G

Guest

Thanks for you reply Phillip,

I managed to resolve the issue by creating a user control that contains the
drop downlist and using the RaiseBubbleEvent to pass the event back to the
DataList Control.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top