Stretch the last column in a Webix datatable

645 Views Asked by At

How can the last column in a Webix datatable be stretched so it extends from the previous column to the right edge of the screen? I'm trying to achieve the column layout below:

enter image description here

I've set autowidth: false and the container div's width is 100%, but the result is just blank space after the last column:

enter image description here

1

There are 1 best solutions below

0
Zwillinge On BEST ANSWER

The fillspace property of the column will be the solution. It may have Boolean and numeric values.

There can be more than one fillspace in the datatable; in this case width will be calculated on the base of a proportion defined by numeric values.

columns:[
  { id:"rank", header:"Rank"},
  { id:"title", header:"Title", width:250},
  { id:"year", header:"Year"}, 
  { id:"votes", header:"Votes", fillspace:1}
]

Please check it in the snippet: http://webix.com/snippet/dd113b85