Compress table & column width

QuestionsCompress table & column width
dai asked 7 years ago

1) How can I automatically shrink the table to fit with the columns to remove the excess whitespace?
2) The example below shows the ID column having extra whitespace. How can I compress it like the actions column by default without hard-coding the column width settings?
example for both: https://screenshots.firefox.com/FbYFw12MH9GFTxEc/localhost
example of outcome: https://screenshots.firefox.com/IQDoFcGXMSamofA9/phpdatagrid.com
The goal is to create a compressed table.

1 Answers
Abu Ghufran Staff answered 6 years ago

Hi,
1) The need to set shrinkToFit property to false (which is also a default behavior unless set to true)
$opt[“shrinkToFit”] = false;
$g->set_options($opt);
2) By default, all columns share equal width available in grid. So if you want to shrink column, you must specify width. In Actions column it is done internally inside library.
 

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

18 + 15 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?