By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,077 Members | 1,309 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,077 IT Pros & Developers. It's quick & easy.

Can you have a DropdownList in an Editable DataLister?

P: n/a
Hello,

I have an Editable Datalist with a DropDownList. I can get the Get value,
but can't Set the Current Value set to the value of the current Edited Item.

Thanks,

Jack
Nov 18 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Do that in the itemcreated event.

"jack" <ja**@mrolinux.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hello,

I have an Editable Datalist with a DropDownList. I can get the Get value,
but can't Set the Current Value set to the value of the current Edited Item.
Thanks,

Jack

Nov 18 '05 #2

P: n/a
>>I have an Editable Datalist with a DropDownList. I can get the Get value,
but can't Set the Current Value set to the value of the current Edited Item


Do that in the itemcreated event.


Actually, you'd want to do it in the ItemDataBound event, since you need
to know the value to set it to! :-) The ItemCreated event fires
*before* the data is bound to the DataListItem.

An example of creating an databound DropDownList in an editable DataGrid
is available at:
http://aspnet.4guysfromrolla.com/articles/080702-1.aspx

Happy Programming!

--

Scott Mitchell
mi******@4guysfromrolla.com
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com

* When you think ASP, think 4GuysFromRolla.com!
Nov 18 '05 #3

P: n/a
Good catch! I've had itemcreated on the brain lately...

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #4

P: n/a
Hello,

Will this work in a DataList, not a DataGrid?

Thanks,

Jack
"Rick Spiewak" <ri*********@mindspring.com> wrote in message
news:OE**************@tk2msftngp13.phx.gbl...
Good catch! I've had itemcreated on the brain lately...

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #5

P: n/a
It should.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.