Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Preserving checked rows state while paginating
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
NeoSwf  
View profile  
 More options Jun 19 2012, 9:24 am
From: NeoSwf <neo...@gmail.com>
Date: Tue, 19 Jun 2012 06:24:12 -0700 (PDT)
Local: Tues, Jun 19 2012 9:24 am
Subject: Preserving checked rows state while paginating

Hi
This topic is more about request of advice.

I have a grid which contain the two features: Pager & RowCheckbox Plugins.
I wish to maintain the state of selected rows while move between different
pages.

My idea is to maintain an array on every pager's page change, using
grid.getSelectedRows()*, *and set selected rows on reaching each page using
grid.setSelectedRows().

What do you guys think? is there a better way? built in one?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Leibman  
View profile  
 More options Jun 19 2012, 6:23 pm
From: Michael Leibman <michael.leib...@gmail.com>
Date: Tue, 19 Jun 2012 15:23:25 -0700
Local: Tues, Jun 19 2012 6:23 pm
Subject: Re: Preserving checked rows state while paginating
Assuming you are using a DataView, this is simple:

// if you don't want the items that are not visible (due to being filtered out
// or being on a different page) to stay selected, pass 'false' to the
second arg
dataView.syncGridSelection(grid, true);


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
NeoSwf  
View profile  
 More options Jun 20 2012, 10:27 am
From: NeoSwf <neo...@gmail.com>
Date: Wed, 20 Jun 2012 07:27:43 -0700 (PDT)
Local: Wed, Jun 20 2012 10:27 am
Subject: Re: Preserving checked rows state while paginating

Tin, do I have to call this method everytime I change a page? or just place
it at the bottom, like u did in example 4, should be enough?
(btw, I already resolved it, but I want to implement your method cause its
a built in one)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Leibman  
View profile  
 More options Jun 20 2012, 2:17 pm
From: Michael Leibman <michael.leib...@gmail.com>
Date: Wed, 20 Jun 2012 11:17:37 -0700
Local: Wed, Jun 20 2012 2:17 pm
Subject: Re: Preserving checked rows state while paginating
You need to call it once when you initialize the DataView.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Shlomi Asaf  
View profile  
 More options Jun 20 2012, 2:22 pm
From: Shlomi Asaf <neo...@gmail.com>
Date: Wed, 20 Jun 2012 15:22:09 -0300
Local: Wed, Jun 20 2012 2:22 pm
Subject: Re: Preserving checked rows state while paginating

Does it suppose to work at example 4, when I choose a row, and activate
pagination?

On Wed, Jun 20, 2012 at 3:17 PM, Michael Leibman
<michael.leib...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
NeoSwf  
View profile  
 More options Jul 17 2012, 6:25 pm
From: NeoSwf <neo...@gmail.com>
Date: Tue, 17 Jul 2012 15:25:21 -0700 (PDT)
Local: Tues, Jul 17 2012 6:25 pm
Subject: Re: Preserving checked rows state while paginating

Tim - is there a built in method to collect the checked items in different
pages?

*grid.getSelectedRows()* returning me only the current page.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »