PDA

View Full Version : focusRow problem



harsha_velicheti
8 Oct 2009, 3:17 AM
Hi,
grid.getView().focusRow(rowIndex) does not focus the required row, any possible reasons for this.

Thanks in advance.
Harsha

Animal
8 Oct 2009, 3:19 AM
You mean it does not select the row don't you?

harsha_velicheti
8 Oct 2009, 3:24 AM
You mean it does not select the row don't you?
yea, it does not select or highlight the row.
The situation is as follows, we have a form in which user enters data and after he clicks on save it is saved into the database and data from database is fetched to a grid, and the row corresponding to the data entered by the user should be highlighted.

TIA
Harsha

Animal
8 Oct 2009, 4:15 AM
So which part of a GridPanel handles selection? Just by glancing at the API docs?

harsha_velicheti
8 Oct 2009, 4:21 AM
So which part of a GridPanel handles selection? Just by glancing at the API docs?
Hi,
Pardon my ignorance, but i am very new to extjs, have been working on it for past 20 days , so could not exactly get what you meant by saying "Which part of gridpanel handles selection?"

Animal
8 Oct 2009, 4:39 AM
OK, scanning through http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.GridPanel after clicking the "Hide inherited members" button to make it easy, which getter should you use to find something that handles selection?

harsha_velicheti
8 Oct 2009, 4:43 AM
OK, scanning through http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.GridPanel after clicking the "Hide inherited members" button to make it easy, which getter should you use to find something that handles selection?

getSelectionModel()
??

harsha_velicheti
8 Oct 2009, 4:50 AM
OK, scanning through http://www.extjs.com/deploy/dev/docs/?class=Ext.grid.GridPanel after clicking the "Hide inherited members" button to make it easy, which getter should you use to find something that handles selection?
Hi animal, Thanks a lot, got it.
But can you please tell me the functionality of view.focusRow()

TIA
Harsha

Animal
8 Oct 2009, 5:04 AM
It scrolls the row into View, and establishes keyboard focus there. Once focussed, uparrow and downarrow will operate from that point.

TigersWay
29 Jan 2010, 5:55 AM
It scrolls the row into View, and establishes keyboard focus there. Once focussed, uparrow and downarrow will operate from that point.

But it does not (yet) work... at least on FF 3.6. Chrome seems to be ok!
Does not work = focus set, but could be invisible (before scrolling)

I read somewhere that it has been corrected in the svn..... Could someone give us an idea how to solve this, waiting for the next release?

Thanks


@Animal: To set a "unique active row", are we suppose to focus and select, or is there a simpler way?
Thanks too