w2ui
Home
Get started
Demos
Docs
Blog
Support
Layout
Grid
Toolbar
Sidebar
Tabs
Form
Popup
Utilities
ver 1.3
ver 1.4
ver 1.5
ver 2.0
Grid
Overview
Events
Properties
Methods
w2grid.reorderRows
Indicates if reordering of rows is allowed.
Boolean, default = false
If reordering of rows is allowed, user can reorder rows by dragging them around. This property can be defined during object creation:
let grid = new w2grid({ name: 'grid', reorderRows: true, columns: [ { field: 'recid', text: 'ID', size: '50px' }, { field: 'lname', text: 'Last Name', size: '30%' }, { field: 'fname', text: 'First Name', size: '30%' }, { field: 'email', text: 'Email', size: '40%' }, { field: 'sdate', text: 'Start Date', size: '120px' }, { field: 'sdate', text: 'End Date', size: '120px' } ], records: [ { recid: 1, fname: 'John', lname: 'doe', email: 'vitali@gmail.com', sdate: '1/3/2012' }, { recid: 2, fname: 'Stuart', lname: 'Motzart', email: 'jdoe@gmail.com', sdate: '2/4/2012' }, { recid: 3, fname: 'Jin', lname: 'Franson', email: '--', sdate: '4/23/2012' }, { recid: 4, fname: 'Susan', lname: 'Ottie', email: 'jdoe@gmail.com', sdate: '5/3/2012' }, { recid: 5, fname: 'Kelly', lname: 'Silver', email: 'jdoe@gmail.com', sdate: '4/3/2012' }, { recid: 6, fname: 'Francis', lname: 'Gatos', email: 'vitali@gmail.com', sdate: '2/5/2012' } ] });
Or any time after the grid has been created:
grid.reorderRows = true;
User Comments
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus