Click here to Skip to main content
15,908,775 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to Maintain drop down list selected value in gridview while paging. It is clearing or showing the selectedindex=0 on when i go to next page. it should keep the selected drop down value suppose if i move to next page or previous page.
Posted
Updated 21-May-12 3:03am
v2
Comments
Mohamed Mitwalli 21-May-12 8:33am    
Not clear try to improve your Question and share your code
[no name] 21-May-12 8:34am    
Why share the code? You say the question is unclear so how do you even know it requires any code?
Mohamed Mitwalli 21-May-12 8:47am    
I meant Question not code
[no name] 21-May-12 11:37am    
Doesn't make any sense. Share the question? The OP already has.

It isn't clear what you are trying to accomplish, but when paging through a gridview maintaining a dropdownlist selection wouldn't make sense, as the values for each row may be different. Unless the dropdownlist is outside of the grid, in which case you maintain the selection state as you would any other ASP.NET control; with viewstate session, cache, whatever is appropriate for your usage.
 
Share this answer
 

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