The Gallery is deprecated. No new Gallery components may be submitted, and modifying existing components is disabled. For more information please read the Gallery Deprecation blog post. This is a static snapshot of the Gallery for archive purposes.
Created: 09/25/12
Last CDN Push: 12/5/12
Build Tag: gallery-2012.12.05-21-01
Project: YUI 3
License: YUI BSD
YUI Version: 3.7.2
Free for use.
This plugin allows resizing of column width in datatable with the mouse by dragging the collumn to it's new size.
In this example we create a datatable with two big columns full of text and plug the Y.DatatableColResizePlugin plugin to add the possibility to resize the column widht via drag and drop.
<script src="http://yui.yahooapis.com/3.7.2/build/yui/yui-min.js"></script>
YUI({
//Last Gallery Build of this module
gallery: 'gallery-2012.12.05-21-01'
}).use('datatable','gallery-datatable-col-resize', function(Y) {
var demodata = [{key: "key1", value: "value1"},{key: "Bavaria ipsum dolor sit amet measi eana fei Baamwach Maderln obandeln pfiad de, a bravs Jodler. A ganze Hoiwe aasgem do, Weibaleid helfgod woaß nackata. Gar nia need Reiwadatschi i hob di narrisch gean, Reiwadatschi i hogg di hera hob i an Suri wolpern. Etza sauba liberalitas Bavariae Schbozal Graudwiggal ded. Owe Hendl muass Engelgwand ja, wo samma denn, Freibia. Da ebba vui, wuid hod nimmds! In da greana Au da, hog di hi muass ned woar auszutzeln, Vergeltsgott am acht’n Tag schuf Gott des Bia wia. Musi hallelujah sog i, luja hoggd Weißwiaschd. Mim Namidog Spuiratz sauba baddscher mogsd a Bussal a geh Haferl kimmt gwiss a liabs Deandl? Weida Hemad nia gwiss, vui. Maßkruag sei measi gwiss Gams wea ko, dea ko i waar soweid greaßt eich nachad, aasgem.", value: "bar sdjfhaishdufoaisdhfgkashdfjashdfkjhsakdfhsadfjhasdlkfjhkalsdhjfjhajkfhlkdjsahfdjlksh"}
];
var table = new Y.DataTable({
columns: ["key", "value"],
data:demodata
});
table.plug(Y.DatatableColResizePlugin);
table.render();
});
All code on this site is licensed under the BSD License unless stated otherwise.