css - Scrollable DataTable with Auto Height -
alloy ui's datatable provides scrollable
attribute define x
or y
scrolling. has used combination of set height
or width
.
how can have table adjust whatever height/width of window along maintaining scrollable
feature?
alloy ui api allows specify height & width in px or round number. if want specify in percentage, set css property "width: 100%" either datatable's table tag, or div contains datatable.
example,
- first, create datatable.
- add css attribute width in percentage
*
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 link detail.
Comments
Post a Comment