Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 04, 2011 02:29 PM by ramastl
Jan 03, 2011 08:41 PM|LINK
I have an ASP page with a DDL box and a grid view associated with it. Everything is working great, except for a teeny problem.
I want to see the sales in the grid view based on the month selected from drop down list. Ex: when I select June 2010 from the ddl box, the sales for that month are correctly displayed in the grid view. I go to page 4 to look at some sales there and then
switch the month to August 2010 to see sales for that month instead. Here is the problem. When I switch the month, it show August 2010 sales, but stays in page 4 instead of going back/resetting back to page 1 of August 2010 sales.
How do I reset the grid view page back to the first page of August 2010 sales?
I am fairly new to ASP. If I have missed an imp. detail in this post, let me know and I will get that info. out there.
grid vew page reset
Jan 03, 2011 08:56 PM|LINK
Pageindex property to 0 every time you change the selection, the DDL has a SelectedIndexChanged event you could use.
Jan 03, 2011 08:57 PM|LINK
You can set GridView's PageIndex property on your DropDownList's SelectedIndexChanged event.
Jan 04, 2011 02:28 PM|LINK
Thank you Pete. I did just that after I posted. At first I didn't even know what to look for in help and I finally figured that it was pageindex and found the same link you provided.
Jan 04, 2011 02:29 PM|LINK
Thanks for the infor Max. That's exactly what I did and it worked.