0

Grid with merged headers

asked 2013-10-17 10:24:11 +0800

Weasley gravatar image Weasley
11 2

updated 2014-03-06 17:47:47 +0800

sitansu gravatar image sitansu
2254 13
http://java91.blogspot.in...

I have a grid with merged headers

<grid id="carparking2SellCarGrid" hflex="min" sizedByContent="true" 
                        mold="paging" pageSize="10" model="${logSellCarListModel}" >
                        <auxhead hflex="min" >
                            <auxheader hflex="min" align="center" colspan="1"/>
                            <auxheader hflex="min" align="center" colspan="2" forEach="${selectedSellCars}" tooltiptext="${each.car_name}" >
                                <label hflex="1" value="${each.car_name}"></label>
                            </auxheader>
                        </auxhead>
                        <columns hflex="min">
                            <column align="center" hflex="min">Date</column>
                            <zk forEach="${selectedSellCars}" >
                                <column align="center" hflex="min">Action</column>
                                <column align="center" hflex="min">User</column>
                            </zk>
                        </columns>
                        <template name="model">
                            <row>
                                <cell>
                                    <label style="overflow: auto;" value="${each.report_time}"/>
                                </cell>
                                <zk forEach="${each.displayed_number}">
                                    <cell><label value="${each}"></label></cell>
                                </zk>
                            </row>
                        </template>

The result is Here


The headers aren't fully displayed, i tried to change the hflex to "1", but not worked. Can anyone give me a grid example with very long merged headers, please?

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2013-10-17 14:18:20 +0800

sjoshi gravatar image sjoshi flag of India
3493 1 8
http://zkframeworkhint.bl...

Try this code

<grid width="200px">
    <auxhead>
        <auxheader label="A" rowspan="2" />
        <auxheader label="BC" colspan="2" />
        <auxheader label="D" rowspan="2" />
    </auxhead>
    <columns><!-- this is wrong since the number of column components is smaller -->
        <column label="B"/>
        <column label="C"/>
    </columns>
    <rows>
        <row>
            <label forEach="E,F,G,H" value="${each}"/><!-- four columns -->
        </row>
    </rows>
</grid>

Or update your question with some demo code of fiddle demo

link publish delete flag offensive edit
0

answered 2014-02-28 10:38:41 +0800

MVarun gravatar image MVarun flag of India
268 1 6

Hello Weasley,

This is because your label of your <auxheader> is smaller than the length of headers labels under it.

Even i faced the same kind of situation sometime back.

What i did was gave ... after exceeding the length of column label length and on mouse over i gave its full Name.

to get full name on mouse over use tooltiptext="auxheader label".

Greetings...

M Varun.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2013-10-17 10:24:11 +0800

Seen: 50 times

Last updated: Mar 06 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More