Alloy UI's DataTable provides a scrollable
attribute to define x
or y
scrolling. This has to be used with a combination of a set height
or width
.
How can I have a table that will adjust to whatever the height/width of the window along with maintaining the scrollable
feature?
Alloy UI API allows you to specify height & width in the px or round number. If you want to specify in the percentage, set the CSS property "width: 100%" for either the DataTable's table tag, or the div that contains the DataTable.
Example,
*
var dataTable = new Y.DataTable({
id: 'mydata-table',
footerView: Y.FooterView,
scrollable: "xy",
height:'300px').render();
$('#mydata-table').css('width', '80%');
$('#mydata-table').css('height', '40%');
Please refer the link for detail.