PDA

View Full Version : Simple Grid Question



Recode
22 Mar 2007, 2:10 PM
Just need to be pointed in the right dir, how do I do something when a grid row is clicked?

cdomigan
22 Mar 2007, 2:31 PM
I'm a newbie, but I think you grab the grid's selection model and bind a handler, like this:

grid.getSelectionModel().on("rowselect", function() {
// do some stuff...
});

This is just going off the api docs...

Chris

kjordan
22 Mar 2007, 3:21 PM
There's also a rowclick and rowdblclick event in the grid in case you don't have a selection model or you want to do something else.

Recode
22 Mar 2007, 4:20 PM
Thanks guys, much appreciated.