| Page 1 of 1 | [ 3 posts ] |
|
Hi,
I've setup my data table, my data source and the cell editor for the datatable as the following. The data field MD can take a value of 0, 1 or 2. After initial request the field MD is correctly shown as 2. But if I try to edit it, the value preselected by the cell editor is 0. How can I synchronize the current value of cell editors with values received from the data source? Thanks. Code: var myColumnDefs = [ {key:"MD", editor: new YAHOO.widget.DropdownCellEditor({dropdownOptions: [0, 1, 2], disableBtns:true}), formatter:YAHOO.widget.DataTable.formatNumber, resizeable:true} ]; var myDataSource = new YAHOO.util.DataSource("json"); myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSON; myDataSource.connXhrMode = "queueRequests"; myDataSource.responseSchema = { resultsList: "ResultSet.Result", fields: ["MD"] }; var myDataTable = new YAHOO.widget.DataTable("ecode", myColumnDefs, myDataSource, {initialRequest:"?resultSetType=ecode"}); |
Alberto SantiniYUI Contributor
|
Hello chengchangwu.
Did you give a look at Satyam's Dynamic dropdownOptions example [1]? And see also the ticket "DataTable Radio cell editor not autochecking selection when datatype is integer" [2]. Hope that helps, IceBox [1] http://www.satyam.com.ar/yui/2.8.0/DynamicDropdown.html [2] http://yuilibrary.com/projects/yui2/ticket/2527749 |
|
It helps, thanks.
|
| Page 1 of 1 | [ 3 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