Paging problem

V

Verdict

Hi
My form includes a dropdown list(DL) that represent types of customers and
submit button(BTN).
When I press the BTN it runs a query related to the selected DL and fills a
datagrid that supports pagination.

The problem is that if I go to page 15 for example and then replace my DL to
another type and submit again, if the other type doesn't have 15 pages as
well, I get error message:
Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount

I tried to reset my datagrid for every BTN pressing by using :
dgSearch.CurrentPageIndex = 0

dgSearch.DataBind()

Any help is appreciated!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top