Combobox ZK电子表格与组合框

Combobox ZK电子表格与组合框,combobox,spreadsheet,zk,Combobox,Spreadsheet,Zk,如何在ZK电子表格单元格中获得combobox,如下面的链接所示 试试这段代码 <?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="sheet

如何在ZK电子表格单元格中获得combobox,如下面的链接所示

试试这段代码

<?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>


组合框是ZK电子表格数据验证下拉列表(当excel单元格验证类型为列表时),它不是嵌入式ZK组合框。我认为ZK电子表格还不支持将外部ZK组件嵌入其中。

我从未使用过ZK电子表格,但我认为这可能与经典列表框中的行为相同

在列表框中,您必须使用模子“select”中的列表框,而不是组合框,如下所示

<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>

您使用的是ZK EE版本吗?