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 don't know how to validate such a complex thing...
Any Ideas?