ParamQuery grid support forum

General Category => Help for ParamQuery Pro => Topic started by: 徐雪峰 on October 10, 2020, 07:08:53 am

Title: about column width
Post by: 徐雪峰 on October 10, 2020, 07:08:53 am
is there any way to set the column width to fit the max length value auto?
Title: Re: about column width
Post by: paramvir on October 12, 2020, 07:02:16 am
I assume you want columns to fill up all the space in the grid.

Have you tried scrollModel: { autoFit: true }

https://paramquery.com/pro/api#option-scrollModel
Title: Re: about column width
Post by: 徐雪峰 on October 13, 2020, 03:54:53 pm
no ,for example,i hope when a value is 100,the column width is 15px,when then value is 10000,the column width is 25px.
is there any way?
Title: Re: about column width
Post by: paramvir on October 13, 2020, 09:01:18 pm
15/100 = 0.15
25/10000 = 0.0025

I don't see any way to set it up.
Title: Re: about column width
Post by: 徐雪峰 on October 15, 2020, 07:52:51 am
sorry, maybe i don't say it clear.
i want the column width to fit the the length of the column value.
for example , when "AA", the column width is fit to "AA",when "AAA",the column width is fit to "AAA".
but it is not nessary to fit the view. the width of grid can longer than the view.
i just want every column width fit it's value length.
is there any way to do it?
Title: Re: about column width
Post by: paramvir on October 19, 2020, 12:16:32 pm
Please check this example: https://paramquery.com/pro/demos/flex