PDA

View Full Version : Column width



Johan
10-Jun-2014, 06:51 AM
I got a question about width of columns from one of my customers.

In List options > Grouped data-colums” you can set Width (px) it works on ”Detail level data-columns…” , in Internet Explorer but not in Chrome.

Should it not work in the header level as well and in all browsers?

I suggested to put the following i Rules for now. But it´s a nasty hack... (In this case .R1E1 accually get two total columns so I need to use:first or another selector to select the first total column)

</script><style>
.R1E1 {
width: 200px;
}
</style><script>

Anyone have any suggestions on a better solution?

Bob Cergol
10-Jun-2014, 07:10 AM
The setting seems to be ignored by webkit-based browsers.
Version 7 -- using HTML5 -- will address this.

Bo may have some other suggestions for you to workaround the issue.

Bob

Johan
11-Jun-2014, 04:52 AM
Here is the final version of the css that solved the problem.

</script>
<style>
.RE td:nth-child(3) a {
width: 100px;
overflow: hidden;
}
.RE td:nth-child(4) a {
width: 300px;
overflow: hidden;
}
</style>
<script>

Bob Cergol
11-Jun-2014, 07:48 AM
Johan,

I just tested this in Chrome and setting the width works for me. I think it has always worked, and in all browsers. What does not work in the webkit browsers is the "wrap" setting.

The behavior in Dynamic AI is that no matter what width you specify, the column will dynamically size as large as it needs to be to output the longest line of data in the column -- unless you click the wrap setting, in which case it will honor the column width and wrap the text. It is this wrapping that does not work in the web-kit browsers.
780778087809

Bob

Bo Andersen
11-Jun-2014, 03:17 PM
Hi Johan,

Do I understand it correctly that you want to not see anything that does not fit in 100px?

The behavior I see is like Bob describes, I think..

If content is WIDER than the set width, the set width is not respected. If set width is greater, it is followed.

I read today that chrome has a default width set to auto -maybe that has an effect..=
http://stackoverflow.com/questions/16942338/word-wrap-doesnt-apply-to-div-inside-fieldset-in-chrome

I suggest you stick your CSS in the style sheet rather than in the Rules section.. like this:
http://support.dynamicai.com/images/screenshots/boa/johancss.swf

Best regards

Bo

Bob Cergol
11-Jun-2014, 09:01 PM
If the goal is to limit the length of a string of data being displayed, then I think the better solution to relying on HTML styling, is to actually specify the length of the data string you wish to show. Dynamic AI makes that easy to do, with the built in "mid" string function that can also start from the left by entering 0, or from the right by entering "R" -- and then just specify the number of characters that you wish to output:
7810

Bob