3.0.0

Built-in method to "Select-All" rows on the grid?

I was wondering if any of you had selected all rows on a grid, once it is displayed? Not just visually, but making sure they get added to the selection/values array as well.

Thanks!
Curtis Hughes
January 22,
Actually, there is another twist, in that I need a method to determine when the grid is complete and drawn to screen, before I can request a row/count. I can wait a set # of secs, but whos to say if it is "truly" drawn after that time.

Anyone ran into this?
Thanks!
Curtis
January 22,
I could use the 'select all' too
Paul
January 22,
If you are using built-in (synchronous) data model, i.e. js array - you don't need to wait until the grid is rendered:

var all = obj.getProperty("row/values");
obj.setProperty("selection/values", all);

If you work with the asynchronous data model (HTTPRequest-based) - you can plug into the table.response() method:

var defaultResponse = table.response;
table.response = function(data){
defaultResponse.call(this, data);
... // do your stuff here
}
Alex (ActiveWidgets)
January 22,
Is there any specific reason why you would like to wait until the grid is rendered? Any operation with the data should be possible regardless of whether you already printed the grid to the page or not. If it's not like that - it's a bug :-)
Alex (ActiveWidgets)
January 22,
Sweetness.. :)

var all = obj.getProperty("row/values");
obj.setProperty("selection/values", all);

Didnt know I could do that..

thanks again Alex..
Paul
January 22,
Alex,

Thanks for the input. Is it just as easy to "de-select all" ?

Thanks!
Curtis
January 23,
Yes, to de-select all

obj.setProperty("selection/values", []);


Cheers,
Sudhaker Raj
July 21,
var all = obj.getProperty("row/values"); only gets the rows currently visible on the page (I'm using the paging patch.)

How do I select literally ALL on ALL pages?
Pete
November 30,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.