| Page 1 of 1 | [ 2 posts ] |
lou
|
I use the build-in formatter:textbox in my datatable;I want the input element at first row have focus when the page first load,but i can not get the input element of the cell,Here are the code:
Code: //inital spot datatable function loadDatable() { var spotColumn = [{ key : "counter", label : "序号", formatter:"number", }, { key : "spot", label : "货位", width:150, formatter:"textbox" }, { key : "lcpn", label : "浪潮PN", width:150, formatter:"textbox" }] var spotDatasource = new YAHOO.util.DataSource([[1]]); spotDatasource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; spotDatasource.responseSchema ={ fields:["counter"] }; var spotDatatable = new YAHOO.widget.DataTable("spotTable",spotColumn,spotDatasource); [b] //get the input column field but log(spotDatatable.getRecord(0).getData("spot"));[/b] } how can i make the input element of a cell get focus,thanks |
lou
|
I now get the way to make the input element of td get focus;
but there is another issue: when a input of a cell gets value from code scanner,i set the next input at the same row get focus,but there is no event listener like valuechange for textinput,could you give me some idea?' thanks |
| 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