Click here to Skip to main content
14,934,560 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have added dropdownlist dynamically inside the gridview.
if user selects 5, 5 dropdownlists will appear.
What i need is user has to select the 1st dropdownlist, 2nd,3rd by order.
how to set validator for that? or is there any option for that?
pls sugest me.
ZurdoDev 27-Mar-13 7:24am
I would use some javascript code as each one changes to then enable the next one. I don't think validators will do this.
Member 9927209 27-Mar-13 7:42am
you can make the dropdownlists invisible and make them visible one at a time in order,use find control to get the controls in grid view and i think you can achieve what you want

1 solution

Both of the suggestions in the comments above are valid solutions. I thought I would add this though.

You could use the SelectedIndexChanged event for each dropdownlist to make visible or enable the following dropdownlists. It would look something like this:

protected void dropdownlist_SelectedIndexChanged(object sender, EventArgs e)
        dropdownlist2.Visible = true;  
        dropdownlist2.Enabled = true;

sukumari1 28-Mar-13 4:55am
thanks 4 ur suggestion, i have implemented it.
Richard C Bishop 28-Mar-13 10:00am
You are welcome.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900