Dont allow datagrid paging if changes are detected

  • Thread starter Luis Esteban Valencia
  • Start date
L

Luis Esteban Valencia

I have a data grid control with a templated checkbox column residing in a
asp.net user control. The checkbox boolean state determines if the item is
later added or removed from another database table. The checkbox column is
not part of the db schema, but is added at run time and initialized
separately before binding the data table to the grid. A batch update is
processed via a server side method invoked from a submit button outside the
datagrid. Now that I have implemented paging, I need to halt it if any of
the check box values have changed. I can't use dataset events because I'm
binding to a dataview due to a sorting requirement. I've also looked into
using jscript arrays, but have not found an way to implement this technique.
The data in the grid can change frequently as there are filters in the form
of drop down lists - a trip to the database and subsequent postbacks are
required to limit the number of rows. I do cache the dataset for a 5 minute
duration to help performance for the re-binding needed for sorting and
paging events, but oviously can't rely on its state to check for changes.
 
B

Ben Strackany

Hmmm...how about adding some code in your PageIndexChanged event to not
change the CurrentPageIndex when you want to prevent the user from switching
pages?
 

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,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top