John Lindal![]()
QuickEdit converts all displayed values (in the columns you choose to configure) into input fields so the user can change all the values in a single bulk operation.
Example of how to configure the DataTable.
<script src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js"></script>YUI({
//Last Gallery Build of this module
gallery: 'gallery-2012.05.16-20-37'
}).use('gallery-quickedit', function(Y) {
var cols = [
{ key: 'title', label: 'Title', quickEdit: true },
{ key: 'year', label: 'Year' },
{ key: 'quantity', label: 'Quantity',
quickEdit: {
validation: { css: 'yiv-required yiv-integer:[0,]' }
}
}
];
var table = new Y.DataTable.Base({columnset: cols});
table.plug(Y.Plugin.DataTableDataSource, {datasource: ds});
table.plug(Y.Plugin.DataTableQuickEdit, {changesAlwaysInclude: ['id']});
table.render("#table");
});
© 2006-2011 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