Datagrid Paging Checkbox

A

Arun

Hello,

I have a problem when we use paging in Datagrid.
We have checkbox in datagrid. If we go to next page, and come to previous
page
the items that had been selected is deselected.

Since we are inserting into db based on items that are selected, we are
having problems
in inserting the records.

Hope you understand my problem.

-Thanks
Arun
 
T

Trevor Benedict R

I assume that you would be reloading the data from the database during
postback when moving to a new page. So you will lose the state of the
previous page. So before you load the data from the Database and
repopulate the Grid you should reflect the changes into the database, or
have the dataset in cache/viewstate/session and then change the dataset
based on the present page setting and then rebind the Grid.

Trevor Benedict R
MCSD

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
 
H

Harshdeep Mehta

Hello Arun,

I was facing same problem, I suppose - not sure -, but it's grid's
limitations,

So it's better you keep all Checkbox's status in some ViewState Variable.
and On ItemDataBound check all CheckBox status before rendering.

Hope that will help you.

Harshdeep Mehta
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top