I create two dropdown lists dynamically for each selected item. That means, if I click select, two dropdown lists appear, the first one defines a start position, the second one a stop position. Both includes numbers (depending on how many items I have selected).
If I have selected 5 items, all dropbox controls include the values 1 - 5. Everything is done by code behind.
Now I want to validate that. The stop control shall be set to a higher one as the start control. Further more, each "area" that is already used, is not allowed for the next controls. E. g. if I select in the first pair of dropdown lists the area 1-5, I shall
not be able to choose 2-6 with the next pair of controls.
How can I do that. I thought about javascript but that could be very tricky because everything is done with code behind. The validation controls are nice, but I dont know how to validate such a complex thing...
that you for your answer. I think, thats the solution for the validation that the stop position is not before the start position. But what about the "area checking". It should be not possible/allowed to choose a area with a control-pair that is already covered
by another one. thats my biggest problem in that case.
_Stefan_
0 Points
15 Posts
DropdownList
Jan 08, 2013 10:34 PM|LINK
Hey,
I have a gridview with records of the database.
I create two dropdown lists dynamically for each selected item. That means, if I click select, two dropdown lists appear, the first one defines a start position, the second one a stop position. Both includes numbers (depending on how many items I have selected). If I have selected 5 items, all dropbox controls include the values 1 - 5. Everything is done by code behind.
Now I want to validate that. The stop control shall be set to a higher one as the start control. Further more, each "area" that is already used, is not allowed for the next controls. E. g. if I select in the first pair of dropdown lists the area 1-5, I shall not be able to choose 2-6 with the next pair of controls.
How can I do that. I thought about javascript but that could be very tricky because everything is done with code behind. The validation controls are nice, but I dont know how to validate such a complex thing...
Any Ideas?
regards,
Stefan
tiagosalgado
Contributor
2410 Points
544 Posts
Re: DropdownList
Jan 08, 2013 11:16 PM|LINK
Have a look on this similar thread http://forums.asp.net/t/1278593.aspx
http://geekswithblogs.com/TiagoSalgado
@TiagoSalgado
_Stefan_
0 Points
15 Posts
Re: DropdownList
Jan 08, 2013 11:31 PM|LINK
Hi,
that you for your answer. I think, thats the solution for the validation that the stop position is not before the start position. But what about the "area checking". It should be not possible/allowed to choose a area with a control-pair that is already covered by another one. thats my biggest problem in that case.
Any ideas?
Thank you very much!
Stefan
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: DropdownList
Jan 10, 2013 01:46 AM|LINK
Hi,
Can you:
1) Submit your whole project directly to SkyDrive with the formation of zip?
2) Draw an image to tell us what do you actually want?
_Stefan_
0 Points
15 Posts
Re: DropdownList
Jan 13, 2013 07:18 PM|LINK
Hey,
thanks for your help but I figured it out by my own.
Thanks,
Stefan
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: DropdownList
Jan 14, 2013 04:31 AM|LINK
Thanks!
But can you tell us how you solved your problem.