I need some help regarding Paging on a Gridview.

I have a few dropdownlists and textbox and a gridview. At first load, the gridview will be populated with data from the sql server. And, I did a search and it works for the first page. When I press the second page, it will be populated back to the database data which it should not be.

Is there anyway to retain my search results when I press subsequence page?

Thanks.

Recommended Answers

All 4 Replies

try storing it in your context.session.
ive always prefered to just hit the database again for each page.
just grab only enough each query to fill one page.
EDIT: sorry i just realized, that you may not be talking about asp.net oops.
in that case, fill a dataset up with the data you need, and pull data from that

Thanks plazmo,

I have manage to solve it.

I just rebind accordingly in my function.

Thanks!

Hi Plazmo, but i m not able to understand this...
I ahve a gridview and want to retain the data which is checked on the checkbox check button.
I want to retain this check when i goes to next page also...
How can I do it?

<script>alert('hai');</script>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.