| Page 1 of 1 | [ 2 posts ] |
|
Hi,
I have a datatable with one column of editable HTML input fields. I need to select the row using arrow keys. Once I use arrow keys for selecting the rows the cursor and row selection should move together. Currently, if I navigate using Arrow keys the cursor will alone move. The row selection will remain at the place where I left and if I use Tab key to select the row, the cursor is remaining in the earlier location. I am using rowClickEvent to select the rows as below: DataTable.subscribe("rowClickEvent", function(evt){ DataTable.onEventSelectRow(evt); var html = evt.target; var trEls=DataTable.getSelectedTrEls(); var fields = YAHOO.util.Dom.getElementsByClassName("fieldname","input",trEls[0]); fields[0].focus(); }); Can somebody please help me achieve this. Thanks for help. |
|
Can't really recommend using HTML input elements in a DataTable, but if you really want to do this you could take a look at Satyam's example.
DataTable does not support "arrow key navigation" natively, it is not a Data Grid. It can be done, but will involve defining arrow key handlers using Event delegation. Good luck! |
| Page 1 of 1 | [ 2 posts ] |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info
Powered by phpBB® Forum Software © phpBB Group