how can i get combobox in a ZK spreadsheet cell as shown in the link below?
问问题
439 次
3 回答
0
组合框是 ZK 电子表格数据验证下拉菜单(当 excel 单元格验证类型为列表时),它不是嵌入式 zk 组合框。我认为 ZK Spreadsheet 还不支持将外部 zk 组件嵌入其中。
于 2013-05-27T02:59:28.950 回答
0
试试这个代码...
<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<zk>
<div height="100%" width="100%" apply="org.zkoss.zssessentials.config.SheetDimensionComposer">
<combobox id="sheets">
</combobox>
<spreadsheet id="spreadsheet" src="/WEB-INF/excel/config/demo_sample.xls"
maxrows="200"
maxcolumns="40"
width="100%"
height="450px"></spreadsheet>
</div>
</zk>
于 2013-05-20T13:04:37.737 回答
0
我从未使用过 ZK 电子表格,但我认为这可能与经典列表框中的行为相同。
在列表框中,您必须使用模具“选择”中的列表框而不是组合框,如下所示。
<listbox id="listOfItems" model="@bind(vm.listOfItems) @template('anItem')" selectedItem="@bind(vm.selectedItem)">
<listhead>
<listheader label="Item-Label" hflex="1" />
<listheader label="Thing-Label" hflex="1" />
</listhead>
<template name="anItem" var="i">
<listitem>
<listcell>
<textbox value="@bind(i.code)" hflex="1" />
</listcell>
<listcell>
<listbox mold="select" model="@bind(vm.listOfThings) @template('aThing')" selectedItem="@bind(i.selectedThing)" hflex="1">
<template name="aThing"var="t">
<listitem label="@load(t.label)" />
</template>
</listbox>
</listcell>
</listitem>
</template>
</listbox>
于 2017-01-16T14:33:10.397 回答