|
-
May 21st, 2013, 02:44 PM
#1
Thread Starter
Fanatic Member
Need advice for dropdownlist control
Hello: I recently made the move from visual studio 2005 to 2012. I have a new assignment at work to create a web app.
I have a form that needs to have a dropdown on it. The user will look to see if there's a value in the dropdown that they want.
this dropdown is bound to values in my sql db.
If they don't see the value they need, they need to add it. I have recently learned that this is not possible to do using the dropdownlist control.
I wanted to come on this forum to get ideas of ways that people incorporate work-arounds for this issue.
It's tough to decide which way to go so hoping to get some ideas and pros and cons of each. e.g.
I've heard of adding a text box control directly under the dropdownlist. Do you think this is the most common approach?
Thanks,
Proctor
-
May 21st, 2013, 04:11 PM
#2
Re: Need advice for dropdownlist control
The problem is not the dropdown as such. It's the binding. To add to a list bound to a datatable you need an editing control capable of producing datarows. In this context you'd need a drop down datagridview. Not possible, you say? Well that's what I thought too but .... http://www.codeproject.com/Articles/...-in-a-ComboBox
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
-
May 21st, 2013, 06:40 PM
#3
Thread Starter
Fanatic Member
Re: Need advice for dropdownlist control
Hello dunfiddlin: thanks for your reply. I'm wondering, have you actually tried this before? You know how in a drop down, when you start typing and it pulls up related data, would this one do that?
Sounds like it would allow the user to add new items which is part of what i'm after.
Let me know what you think. thanks, again.
ps...also looking at the Ajax controls but wasn't sure which to use or if any would work for what I want.
Proctor
-
May 21st, 2013, 07:18 PM
#4
Re: Need advice for dropdownlist control
It's on my list of things to try but I haven't as yet got a round tuit. Autocomplete, which I guess is what you're asking for, would not be built in at this stage as far as I've read it. It's a bit of a mad idea at the moment with wrinkles yet to be ironed out but I just thought I should show off how I'm keeping abreast of .... er ... make you aware of all the possibilities.
I hadn't really taken on board that this was intended as a 'web app'. You might well be better asking this question in the ASP forum if that means what it appears to mean.
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
-
May 22nd, 2013, 02:16 PM
#5
Thread Starter
Fanatic Member
Re: Need advice for dropdownlist control
thanks again for your help and suggestions. At least it gives me another option to try. I think I'll also do as you suggest and go onto the ASP forum.
Proctor
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|