无法在zk中设置auxheader的宽度

时间:2014-02-13 04:11:33

标签: zk zk-grid

我有一个网格,我想在.zul中为auxheader设置宽度,但它不起作用。我正在使用zk框架。

<grid id="chartGrid" model="@bind(vm.chartGridModel)" mold="paging" 
      style="overflow:auto" width="100%"  >
    <auxhead hflex="2" >
        <auxheader hflex="2" align="center" width="200px" label="Date" rowspan="3"/>
    </auxhead>
    <auxhead hflex="1"  children="@bind(vm.legendsFB)" visible="@bind(vm.vFb)" >
        <auxheader align="center" width="200px" colspan="1"></auxheader>
          <template name="children">
                <auxheader align="center" label="@bind(each)" colspan="@bind(
                     vm.viewType eq '0' ? 3 :2)" hflex="2"/>
            </template>
    </auxhead>

    <columns visible="false"><!-- make it invisible -->
    <column width="200px"/><!-- specify width here -->
    <column width="150px"/>
    <column width="50px"/>
    <column width="50px"/>
    </columns>
<template name="model">
    <row>
          <cell align="center" ><label  value="@load(each.report_date)"></label>
          </cell>
          <cell align="center"><label value="@load(each.total_action)"></label>
          </cell>    
          <cell align="center"><label value="@load(each.from_user_male)"></label>
          </cell>    
          <cell align="center"><label value="@load(each.from_user_female)"></label>
          </cell>    
    </row>
</template>
</grid>

1 个答案:

答案 0 :(得分:0)

你设置宽度和colspan。

colspan =“x”表示您将获取模板x列的信号。

现在你可以删除colspan 并且它应该可以工作,但是请记住在px中设置宽度时, 确保总px与所有行的px相同。

您也可以执行width =“20%”,这意味着您需要占列的px总大小的20%。 它更容易计算到100%然后你的总px。

Greetz chill。

相关问题