Dan Dascalescu
Dan Dascalescu

Reputation: 151684

Stretch the last column in a Webix datatable

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

Upvotes: 0

Views: 628

Answers (1)

Zwillinge
Zwillinge

Reputation: 81

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

Upvotes: 3

Related Questions