:: Forum >>
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
Thursday, January 22, 2004
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
Thursday, January 22, 2004
I could use the 'select all' too
Paul
Thursday, January 22, 2004
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)
Thursday, January 22, 2004
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)
Thursday, January 22, 2004
Sweetness.. :)
var all = obj.getProperty("row/values");
obj.setProperty("selection/values", all);
Didnt know I could do that..
thanks again Alex..
Paul
Thursday, January 22, 2004
Alex,
Thanks for the input. Is it just as easy to "de-select all" ?
Thanks!
Curtis
Friday, January 23, 2004
Yes, to de-select all
obj.setProperty("selection/values", []);
Cheers,
Sudhaker Raj
Wednesday, July 21, 2004
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
Wednesday, November 30, 2005
This topic is archived.
Back to support forum
Forum search