PDA

View Full Version : [CLOSED] select the drop down problem



tobros
Nov 13, 2013, 4:08 AM
plz see http://screencast.com/t/HEfARcIgEM
when i add multi blank row , when select the not first row , the dropdownlist field can not be triggered.

tobros
Nov 13, 2013, 4:11 AM
error
7198

tobros
Nov 13, 2013, 4:12 AM
code:


<ext:Window runat="server" Title="现金流量_数据调整" ID="w_xjllxm" Hidden="True" Padding="4" Width="360">

<Items>
<ext:GridPanel ID="GridPanel1" Stateful="True" runat="server" ColumnLines="True" Border="true">
<TopBar>
<ext:Toolbar runat="server">
<Items>
<ext:Button runat="server" Text="新增" Icon="ApplicationAdd">
<Listeners>
<Click Handler="App.s_xjllsjtz.insert(0,{'CashFlowDataID':0,'Fpje' :'','CashFlowName':'','CashFlowId':''});"></Click>
</Listeners>
</ext:Button>

</Items>
</ext:Toolbar>
</TopBar>
<Store>
<ext:Store runat="server" ID="s_xjllsjtz">
<Model>
<ext:Model ID="Model1" runat="server" IDProperty="CashFlowDataID">
<Fields>
<ext:ModelField Name="CashFlowDataID"></ext:ModelField>
<ext:ModelField Name="Fpje" Type="Float"></ext:ModelField>
<ext:ModelField Name="CashFlowName" Type="Object" ServerMapping="Cwzz_CashFlowItem.CashFlowName"></ext:ModelField>
<ext:ModelField Name="CashFlowId" Type="Object" ServerMapping="Cwzz_CashFlowItem.CashFlowId"></ext:ModelField>
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:SummaryColumn SummaryType="None" ID="Column1" runat="server" Flex="2" Text="现金流量项目" DataIndex="CashFlowId">
<Editor>
<ext:DropDownField ID="DropDownField1" runat="server" Mode="ValueText" MatchFieldWidth="False" Editable="False">
<Component>
<ext:GridPanel Stateful="True" runat="server" Width="350" ID="cb_cash_flow_item" StoreID="s_cash_flow_item">

<ColumnModel>
<Columns>
<ext:Column ID="Column2" runat="server" Text="项目编码" DataIndex="CashFlowCode"></ext:Column>
<ext:Column ID="Column3" runat="server" Text="项目名称" Flex="1" DataIndex="CashFlowName"></ext:Column>
</Columns>
</ColumnModel>
<BottomBar>
<ext:Toolbar ID="Toolbar1" runat="server">
<Items>
<ext:PagingToolbar ID="PagingToolbar2" StoreID="s_cash_flow_item" runat="server"></ext:PagingToolbar>
</Items>
</ext:Toolbar>
</BottomBar>
<Listeners>
<ItemClick Fn="ic_select"></ItemClick>
</Listeners>
<Plugins>
<ext:FilterHeader ID="FilterHeader1" runat="server" Remote="true" />
</Plugins>
</ext:GridPanel>

</Component>
</ext:DropDownField>
</Editor>
<Renderer Fn="render_xjll"></Renderer>
<SummaryRenderer Handler="return '合计:'"></SummaryRenderer>
</ext:SummaryColumn>
<ext:SummaryColumn SummaryType="Sum" ID="NumberColumn1" Flex="1" runat="server" Text="分配金额" DataIndex="Fpje">
<Editor>
<ext:NumberField ID="nf_fpje" AllowDecimals="True" DecimalPrecision="2" runat="server"></ext:NumberField>
</Editor>
<SummaryRenderer Fn="sr_fpjesum"></SummaryRenderer>
<Renderer Fn="sr_fpje"></Renderer>
</ext:SummaryColumn>
</Columns>
</ColumnModel>
<BottomBar>
<ext:Toolbar ID="Toolbar2" runat="server" Layout="VBoxLayout">
<LayoutConfig>
<ext:VBoxLayoutConfig Pack="Center" />
</LayoutConfig>
<Items>
<ext:TextField runat="server" ID="tf_pzjehj" ReadOnly="True" FieldLabel="凭证金额合计">
</ext:TextField>

<ext:TextField runat="server" ID="tf_fpjehj" ReadOnly="True" FieldLabel="分配金额合计"></ext:TextField>
<ext:Container ID="Container1" runat="server" Layout="HBoxLayout" Width="336">
<LayoutConfig>
<ext:HBoxLayoutConfig Pack="Center" />
</LayoutConfig>
<Items>
<ext:Button ID="btn_save" runat="server" Text="确定">
<DirectEvents>
<Click OnEvent="SaveClick" Before="return #{s_xjllsjtz}.isDirty();">
<ExtraParams>
<ext:Parameter Name="data" Value="#{s_xjllsjtz}.getChangedData()" Mode="Raw" Encode="true" />
</ExtraParams>
</Click>
</DirectEvents>
</ext:Button>
<ext:DisplayField ID="DisplayField1" runat="server" Text="&nbsp;&nbsp;"></ext:DisplayField>
<ext:Button ID="Button5" runat="server" Text="取消">
<Listeners>
<Click Handler="#{w_xjllxm}.hide();"></Click>
</Listeners>
</ext:Button>
</Items>
</ext:Container>

</Items>
</ext:Toolbar>
</BottomBar>
<Plugins>
<ext:CellEditing ID="CellEditing1" runat="server" ClicksToEdit="1"></ext:CellEditing>
</Plugins>
<Features>
<ext:Summary ID="Summary1" runat="server" />
</Features>
</ext:GridPanel>

</Items>
</ext:Window>

Daniil
Nov 13, 2013, 5:06 AM
Hi @tobros,

You are inserting a few records with

'CashFlowDataID':0
but

IDProperty="CashFlowDataID"

The IDProperty field must have unique values.