Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stretch colWidths except a specified column #3665

Closed
varun-dev opened this issue Jul 18, 2016 · 6 comments
Closed

Stretch colWidths except a specified column #3665

varun-dev opened this issue Jul 18, 2016 · 6 comments

Comments

@varun-dev
Copy link

Hi,

Is it possible to specify fixed width to a column and stretch others ?
I did try to read through other posts here but did not find any solution.

Thanks
Varun

@AMBudnik
Copy link
Contributor

Hi @varun-dev
You can set a minimum width of a column and left others, like here: http://jsfiddle.net/34grf5qs/
Currently stretchH option takes only 3 possible options: none, all and last

@varun-dev
Copy link
Author

Hi @AMBudnik
Thanks for your response. I need a fixed width hence I am only left with an option to hack the column width by doing something like

.handsontable col:nth-child(1){
  width:100px !important;
}

however I need to be able to add a class on the col tags in the colgroup.

.handsontable col.fixed{
  width:100px !important;
}

Can you think of a way to do that?

@AMBudnik
Copy link
Contributor

Can you share a Fiddle with the example that you already got?

@varun-dev
Copy link
Author

I was thinking of doing something like this
http://jsfiddle.net/34grf5qs/1/
Its kinda working with the first column but overall width of the table to getting wrongly calculated.

@AMBudnik
Copy link
Contributor

AMBudnik commented Aug 1, 2016

Hi @varun-dev
I think that you may have a 'fixed height only' on your mind. This will allow the table to get the 100% width of the parent container.

Like described in our blog post: https://handsontable.com/blog/articles/a-complete-guide-to-changing-size-of-handsontable
it is currently unavailable.

@stanleyxu2005
Copy link

This is a wonderful feature. I'd have read the doc more carefully.

@AMBudnik AMBudnik closed this as completed Sep 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants