Revision history [back]

click to hide/show revision 1
initial version

asked 2013-08-28 17:13:45 +0800

MaxRozenson gravatar image MaxRozenson

Combobox in grid row trouble

Hi! I'm tying to reproduce combobox inline editing feature, like in Inline Editing (Grid) demo. Here is part of my view:

<grid id="hypothesisMainGrid"
                                model="@load(vm.curUserHyps)"
                                mold="paging" pageSize="4" 
                                pagingPosition="bottom" hflex="1">
                            <columns>
                                <column label="Номер" />
                                <column label="Статус" />
                            </columns>
                            <template name="model">
                                <row>
                                    <label  value="@load(each.hypId)" width="99%" />
                                    <combobox  
                                                readonly="true" model="@load(vm.hypStatusList)"
                                                selectedItem="@bind(each.hypothesisStatus)"
                                                 hflex="1"
                                                inplace="true">
                                                <template
                                                    name="model">
                                                    <comboitem
                                                        label="@load(each.name)" value="@load(status)" />
                                                </template>
                                    </combobox>         
                                </row>
                            </template>
                        </grid>

The trouble is that selecting some item in combobox causes all items in grid model to change correspondig field. image description

Why this can happen? I use ZK 6.5.2 CE. Thanks in advance, Max

Combobox in grid row trouble

Hi! I'm tying to reproduce combobox inline editing feature, like in Inline Editing (Grid) demo. Here is part of my view:

<grid id="hypothesisMainGrid"
                                model="@load(vm.curUserHyps)"
                                mold="paging" pageSize="4" 
                                pagingPosition="bottom" hflex="1">
                            <columns>
                                <column label="Номер" />
                                <column label="Статус" />
                            </columns>
                            <template name="model">
                                <row>
                                    <label  value="@load(each.hypId)" width="99%" />
                                    <combobox  
                                                readonly="true" model="@load(vm.hypStatusList)"
                                                selectedItem="@bind(each.hypothesisStatus)"
                                                 hflex="1"
                                                inplace="true">
                                                <template
                                                    name="model">
                                                    <comboitem
                                                        label="@load(each.name)" value="@load(status)" />
                                                </template>
                                    </combobox>         
                                </row>
                            </template>
                        </grid>

The trouble is that selecting some item in combobox causes all items in grid model to change correspondig field. image descriptionfield (please see screen here).

Why this can happen? I use ZK 6.5.2 CE. Thanks in advance, Max

Combobox in grid row trouble

Hi! I'm tying to reproduce combobox inline editing feature, like in Inline Editing (Grid) demo. Here is part of my view:

<grid id="hypothesisMainGrid"
                                model="@load(vm.curUserHyps)"
                                mold="paging" pageSize="4" 
                                pagingPosition="bottom" hflex="1">
                            <columns>
                                <column label="Номер" />
                                <column label="Статус" />
                            </columns>
                            <template name="model">
                                <row>
                                    <label  value="@load(each.hypId)" width="99%" />
                                    <combobox  
                                                readonly="true" model="@load(vm.hypStatusList)"
                                                selectedItem="@bind(each.hypothesisStatus)"
                                                 hflex="1"
                                                inplace="true">
                                                <template
                                                    name="model">
                                                    <comboitem
                                                        label="@load(each.name)" value="@load(status)" />
                                                </template>
                                    </combobox>         
                                </row>
                            </template>
                        </grid>

The trouble is that selecting some item in combobox causes all items in grid model to change correspondig field (please (hypothesisStatus). Please see screen here).). The same happens with listbox.

Why this can happen? I use ZK 6.5.2 CE. Thanks in advance, Max

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