How To Adjust Width Of Columns. | OutSystems

Community/Forums/QuestionsUserImage.jpgNannuRank: #2917How to adjust width of columns.4161Views12CommentsSolvedQuestionOutSystems Widgets

Hello,

I am trying to display more than 12 columns in the table widget, but it's not showing all of them on the screen. I am building reactive web app.

Do I need to add any style property for Table?

Please suggest me how can I achieve this.

Thank you for your time.

0003 Jun 2020Copy post link2016-04-22 00-29-45Nuno Reis MVPRank: #44Solution

I've implemented it before. The logic is a bit tricky.

In both you need to do a match between human-readable column name and internal name.

Option 1: have an output structure of type text, text, text... to save all the returned values. Your select will be a configurable inline parameter. The table on page will hide columns that are not set.

Option 2: Add a JS plugin to reorder them ( think I used this one in a traditional project). Set the starting string to be what the user wanted. Here you only need to give a unique name to each column.

I may do a video on that, but not for at least a week.

See solution in context0004 Jun 2020Copy comment link
UserImage.jpg1 reply04 Jun 2020Show threadHide threadUserImage.jpgNannuRank: #2917

Nuno Reis wrote:

I've implemented it before. The logic is a bit tricky.

In both you need to do a match between human-readable column name and internal name.

Option 1: have an output structure of type text, text, text... to save all the returned values. Your select will be a configurable inline parameter. The table on page will hide columns that are not set.

Option 2: Add a JS plugin to reorder them ( think I used this one in a traditional project). Set the starting string to be what the user wanted. Here you only need to give a unique name to each column.

I may do a video on that, but not for at least a week.

Thank you Nuno for helping me with this. I have found solution in one of your older post. I created one boolean variable for each column and controlled the visibility from checkbox.

1004 Jun 2020Copy comment link
2023-09-28 14-21-55Daryna KravetsRank: #367

Hi Nannu,

You can adjust width (using columns, pixels or percentages) in the styles tab:

0003 Jun 2020Copy comment link
UserImage.jpg1 reply03 Jun 2020Show threadHide threadUserImage.jpgNannuRank: #2917

Daryna Kravets wrote:

Hi Nannu,

You can adjust width (using columns, pixels or percentages) in the styles tab:

Hi Daryna,

I tried adjusting width in px from default value of Header Cell and Header row for Id Column but it didn't work.

0003 Jun 2020Copy comment link
2016-04-22 00-29-45Nuno Reis MVPRank: #44

Hello Nannu.

OutSystems and Bootstrap are based in a grid system. It works on a 12 column system so you can split the screen in equal part of 1/2, 1/3, 1/4, 1/6, 1/12, or a mix like 1/3+2/3.

It makes web development very easy, responsive and is easy to read compared with loads of specific CSS.

The disadvantage is that you can't have more than 12 columns by default.

Solution 1:

Do you need more than 12 columns? It seems a waste of space. Filter out some information, leaving only what is relevant. The rest can go on details screen or be exported as excel.

Solution 2: Place the table inside a container and add the css "overflow-x:auto" to make it scrollable.

Solution 3: do your own html/css like in the old days.

0003 Jun 2020Copy comment link
UserImage.jpg1 reply03 Jun 2020Show threadHide threadUserImage.jpgNannuRank: #2917

Nuno Reis wrote:

Hello Nannu.

OutSystems and Bootstrap are based in a grid system. It works on a 12 column system so you can split the screen in equal part of 1/2, 1/3, 1/4, 1/6, 1/12, or a mix like 1/3+2/3.

It makes web development very easy, responsive and is easy to read compared with loads of specific CSS.

The disadvantage is that you can't have more than 12 columns by default.

Solution 1:

Do you need more than 12 columns? It seems a waste of space. Filter out some information, leaving only what is relevant. The rest can go on details screen or be exported as excel.

Solution 2: Place the table inside a container and add the css "overflow-x:auto" to make it scrollable.

Solution 3: do your own html/css like in the old days.

Hi Nuno,

I just realized that it's not even showing 12 columns in the table.

I can go with solution 2 but it's making actual content of the table scrollable as well (eg. Big form name).

Thanks.

0003 Jun 2020Copy comment link
2016-04-22 00-29-45Nuno Reis MVPRank: #44

Because some columns are wide (a lot of content) they take more than the bare minimum.

You can always shrink the content (as in, more line breaks). I mentioned the possibility here but never heard back if it works.

Again, 12 columns is ugly. "less is more" "simple is beautiful" and all those made sentences.

0003 Jun 2020Copy comment link
UserImage.jpg1 reply04 Jun 2020Show threadHide threadUserImage.jpgNannuRank: #2917

Nuno Reis wrote:

Because some columns are wide (a lot of content) they take more than the bare minimum.

You can always shrink the content (as in, more line breaks). I mentioned the possibility here but never heard back if it works.

Again, 12 columns is ugly. "less is more" "simple is beautiful" and all those made sentences.

Got it,thank you Nuno. To solve this problem is there any way to give controls to the users so that they can select

columns whichever they wanna see?

0004 Jun 2020Copy comment link
2016-04-22 00-29-45Nuno Reis MVPRank: #44Solution

I've implemented it before. The logic is a bit tricky.

In both you need to do a match between human-readable column name and internal name.

Option 1: have an output structure of type text, text, text... to save all the returned values. Your select will be a configurable inline parameter. The table on page will hide columns that are not set.

Option 2: Add a JS plugin to reorder them ( think I used this one in a traditional project). Set the starting string to be what the user wanted. Here you only need to give a unique name to each column.

I may do a video on that, but not for at least a week.

0004 Jun 2020Copy comment link
UserImage.jpg1 reply04 Jun 2020Show threadHide threadUserImage.jpgNannuRank: #2917

Nuno Reis wrote:

I've implemented it before. The logic is a bit tricky.

In both you need to do a match between human-readable column name and internal name.

Option 1: have an output structure of type text, text, text... to save all the returned values. Your select will be a configurable inline parameter. The table on page will hide columns that are not set.

Option 2: Add a JS plugin to reorder them ( think I used this one in a traditional project). Set the starting string to be what the user wanted. Here you only need to give a unique name to each column.

I may do a video on that, but not for at least a week.

Thank you Nuno for helping me with this. I have found solution in one of your older post. I created one boolean variable for each column and controlled the visibility from checkbox.

1004 Jun 2020Copy comment link
2016-04-22 00-29-45Nuno Reis MVPRank: #44

I'm amazed you really only needed hide/show (usually people ask that but later want to change order).

I'm even more amazed that I answered your question six years ago! Glad younger me could help you :)

2004 Jun 2020Copy comment link
2022-12-21 13-30-20Abhishek JainRank: #935

just add this css class on container "overflow-vertical"

1025 Jun 2023Copy comment link
2022-07-21 14-07-25Abeer elAssal MVPRank: #1103

I saw this question now, maybe very late, but here's how I usually use to solve it, you can add this CSS code:

table { table-layout:fixed;}

td { overflow: hidden; text-overflow: ellipsis; word-wrap: break-word;}

2022 Feb 2024Copy comment link
2022-08-17 08-19-34Erga KandlyRank: #19578

I found another alternative solution,just make the header of your table have more length than its contant

006 days agoCopy comment link
Try OutSystems nowGenerate an App with AI Loading...

Từ khóa » Html Column Width Auto Adjust