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,

  1. first, create datatable.
  2. 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

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -