Textgrid2 - double scrollbars

Hello,

I use textgrid2 in combination with csvcolumn.
The size of columns included in the csvcolumn is unlimited. So I set hscrollbar=true in the textgrid. But if the width of this control exceeds the available width, not the textgrid’s scrollbar but the ie’s horizontal scrollbar is shown. This causes that the vertical scrollbar is also displayed.
Finally, I can have 4 scrollbar: 2 horizontal and 2 verticals.
Is the hscroll-property not supported by textgrid2 as the documentation told?

Greetz.

Extract - .xml

					<textgrid2 griddataprop="stationList" height="100%" width="100%"
						fixedcolumnsizes="true" selectprop="selected"
						singleselect="true" hscroll="true">
						<column textid="name" property="station" width="150"
							cuttextline="false"/>
						<csvcolumn titlesprop="gridTitles" valuesprop="values"
							widthsprop="gridWidths" cuttextline="false"/>
					</textgrid2>

Extract - adapter


            m_GridTitles = CSVManager.append(m_GridTitles, "someTitle");
            m_GridWidths = CSVManager.append(m_GridWidths, "50");

Can you send whole page code ?

xml:

	<pagebody takefullheight="true">
		<rowarea name="" height="100%" width="100%">
			<vdist height="5"/>
			<rowscrollarea height="100%" takefullheight="true"
				takefullwidth="false">
				<itr height="100%" takefullwidth="false">
					<textgrid2 griddataprop="stationList" height="100%" width="100%"
						fixedcolumnsizes="true" selectprop="selected"
						singleselect="true" hscroll="true">
						<column textid="name" property="station" width="150"
							cuttextline="false"/>
						<csvcolumn titlesprop="gridTitles" valuesprop="values"
							widthsprop="gridWidths" cuttextline="false"/>
					</textgrid2>
				</itr>
			</rowscrollarea>
			<vdist height="5"/>
		</rowarea>
	</pagebody>

Adapter:


...
        while(iterator.hasNext())
        {
            String something = (String) iterator.next();
            m_GridTitles = CSVManager.append(m_GridTitles, something);
            m_GridWidths = CSVManager.append(m_GridWidths, "50");
        }

        // column to 100%
        m_GridTitles = CSVManager.append(m_GridTitles, " ");
        m_GridWidths = CSVManager.append(m_GridWidths, "100%");
...

Try to use this one :


<pagebody vscroll="hidden" hscroll="hidden" takefullheight="true">
        <itr takefullwidth="true" height="100%" fixlayout="true">
            <textgrid2 griddataprop="stationList" width="100%" height="100%" selectprop="selected" singleselect="true" hscroll="true" vscroll="auto" fixedcolumnsizes="false">
                <column name="name" property="station" width="150" cuttextline="false">
                </column>
                <csvcolumn titlesprop="gridTitles" valuesprop="values" widthsprop="gridWidths" cuttextline="false">
                </csvcolumn>
            </textgrid2>
        </itr>
    </pagebody>

And the enclosed paragraph from developer’s guide may help you :

If setting fixlayout to ““true”” then the control’s area is
defined as area which is not sized dependent on its
content (as normally done with table rendering). Instead
the size is predefined from outside without letting the
browser ““look”” into the content of the area. If the content
is not fitting into the area then it is cut.
You typically use this control if the content of the control’s
area is flexibly sizable. E.g. if the content (e.g. a TEXTGRID
control) is following the size of the container.
When using vertical percentage based sizing you should
pay attention to set the fixlayout-attribute to ““true”” as
often as possible. - The browser as consequence will be
much faster in doing its rendering because a screnn
consists out of ““building blocks”” with simple to calculate
sizes."

:smiley:
Yes, now it works. Well, I did also try some combinations, but obviously I haven’t found the correct yet.

Thanks a lot, Serhat!