Mar 20, 2012, 10:52 AM
[CLOSED] Question about how to set up value in Grid Editor
Hello. I'm working on my project and have a question about how to handle data when keyup event is occured in textfield.
In detail, There is a number field that is called "Numberfiled1" for ID
Moreover, when keyup event is occured, the value should be in column where header is "TotalPrice"
Partial code of my project is following... I hope some codes don't bother you because it is korean.
Please advice me how to set up the value of "this.getValue() * True_Price" and put it into header is called "TotalPrice"
In detail, There is a number field that is called "Numberfiled1" for ID
<ext:NumberField ID="NumberField1" runat="server" AllowDecimals="true" DecimalPrecision="1" MinValue="-99" MaxValue="99"
SelectOnFocus="true" MaxLength="3" Cls="GridNumCss" EnableKeyEvents="true">
<Listeners>
<KeyUp Handler="this.getValue() * True_Price" />
</Listeners>
</ext:NumberField>
and I want to set the value of multiplication True_Price and value of input field.Moreover, when keyup event is occured, the value should be in column where header is "TotalPrice"
<ext:Column Header="TotalPrice" Width="200" Align="Center" ColumnID="TotalPrice" MenuDisabled="true">
Partial code of my project is following... I hope some codes don't bother you because it is korean.
Please advice me how to set up the value of "this.getValue() * True_Price" and put it into header is called "TotalPrice"
<ext:GridPanel ID="OrderGrid_2" runat="server" Width="1140" AutoHeight="true" Frame="false" Border="false" StripeRows="true" BaseCls="GridCss" ClientIDMode="Static">
<Store>
<ext:Store ID="OrderStore2" runat="server" ClientIDMode="Static">
<Reader>
<ext:JsonReader>
<Fields>
<ext:RecordField Name="B_Code" Type="Auto" />
<ext:RecordField Name="Term" Type="Auto" />
<ext:RecordField Name="Grade" Type="Auto" />
<ext:RecordField Name="Gubun" Type="Auto" />
<ext:RecordField Name="B_Name_S" Type="Auto" />
<ext:RecordField Name="Order_Book" Type="Auto" DefaultValue="0" />
<ext:RecordField Name="True_Price" Type="Auto" />
<ext:RecordField Name="Min_Cnt" Type="Auto" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
<Plugins>
<ext:EditableGrid ID="EditableGrid2" runat="server" />
</Plugins>
<ColumnModel>
<Columns>
<ext:Column Header="학기" Width="100" Align="Center" DataIndex="Term" MenuDisabled="true" />
<ext:Column Header="학년" Width="100" Align="Center" DataIndex="Grade" MenuDisabled="true">
<Renderer Fn="GradeName" />
</ext:Column>
<ext:Column Header="교재구분" Width="130" Align="Center" DataIndex="Gubun" MenuDisabled="true" />
<ext:Column Header="교재명" Width="410" DataIndex="B_Name_S" MenuDisabled="true" />
<ext:Column Header="주문부수" Width="200" Align="Center" MenuDisabled="true" DataIndex="Order_Book">
<Editor>
<ext:NumberField ID="NumberField1" runat="server" AllowDecimals="true" DecimalPrecision="1" MinValue="-99" MaxValue="99"
SelectOnFocus="true" MaxLength="3" Cls="GridNumCss" EnableKeyEvents="true">
<Listeners>
<KeyUp Handler="this.getValue() * True_Price" />
</Listeners>
</ext:NumberField>
</Editor>
<EditorOptions CompleteOnEnter="true" CancelOnEsc="true" />
</ext:Column>
<ext:Column Header="TotalPrice" Width="200" Align="Center" ColumnID="TotalPrice" MenuDisabled="true">
</ext:Column>
</Columns>
</ColumnModel>
<%-- RowSelectionModel --%>
<SelectionModel>
<ext:RowSelectionModel ID="Order_Grid_Select2" runat="server" SingleSelect="true" />
</SelectionModel>
<%-- RowSelectionModel --%>
<LoadMask ShowMask="true" Msg="데이터 조회중..." />
<View>
<ext:GridView EmptyText="조회된 데이터가 존재하지 않습니다." />
</View>
</ext:GridPanel>
Last edited by Daniil; Mar 26, 2012 at 9:49 PM.
Reason: Please use [CODE] tags, [CLOSED]