Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>How you would do this is different depending on if you are doing page refreshes for scrolling or ajax. </p> <p>If you are just reloading the page with the new page information, then you will need some kind of state to keep track of the previously selected items. This could be done either in Session, or in a temporary table. A temporary table would survive a session reset, and would work in a server farm scenario.</p> <p>In any event, either your page postsback on checkbox click, or you post on next page (In either case you want to do a <a href="http://en.wikipedia.org/wiki/Post/Redirect/Get" rel="nofollow">post-redirect-get pattern</a>). When the page refreshes, you need to return an indication of whether the collection is dirty or not, and enable the submit button.</p> <p>Be aware that a user could walk away in mid-selection and come back half an hour later or something. If their login is still valid, and you use session, session may have recycled. </p> <p>If you're doing Ajax, then you need to keep a running list of changes, so that if the user later unselects them you can disable the submit button again. You would keep this list in a hidden field, and either ajax post each checkbox as it happens to a temporary table, or you could just keep the running total in the hidden and apply the changes when submit is called. Your hidden field would probably contain a list of id's that you have changed (either checked or unchecked). And when the field is empty, disable the button and when it's not, enable it.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload