PDA

View Full Version : I m having a formpanel which consists of different controls and on clicking Submit button does not save the records



AshwiniRane
Feb 29, 2016, 5:34 AM
My code is as follows..Where I have given Before="return #{FormPanFee}.isValid();"..If I remove this line from my code then it allows me to save my records otherwise it does not save...Please help me its urgent..




<ext:FormPanel ID="FormPanFee" runat="server" Width="730">
<Items>
<ext:FieldSet ID="FormFee" runat="server" Frame="true">
<Items>
<ext:FieldSet ID="FFeeDet" runat="server" ColumnWidth="1" Layout="ColumnLayout" >
<Items>
<IWControl:iComboBox ID="FeeStructureDDl" runat="server" FieldLabel="1st Party" ColumnWidth="0.5" MarginSpec="5 5 0 10"
DisplayField="Name" AllowBlank="false" IndicatorText="*" IndicatorCls="red-text"
MsgTarget="Side" EmptyText="Select Fee Structure" ValueField="Id" TriggerAction="All"
QueryMode="Local" TabIndex="4436">
<Store>
<ext:Store ID="StoreFeeStructure" runat="server">
<Model>
<ext:Model ID="ModelFeeStructure" runat="server" IDProperty="Id">
<Fields>
<ext:ModelField Name="Name" Type="String" Mapping="Name" />
<ext:ModelField Name="Id" Type="String" Mapping="Id" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<Listeners>
<Select Handler="App.direct.FillFeeDetGrid();" />
</Listeners>
</IWControl:iComboBox>
<IWControl:iComboBox ID="FeeInOutDDl" runat="server" ColumnWidth="0.4" MarginSpec="5 5 0 0" IndicatorText="*" IndicatorCls="red-text"
DisplayField="Name" EmptyText="Fees In/Out From" ValueField="Id" TriggerAction="All" TabIndex="4437"
QueryMode="Local">
<Store>
<ext:Store ID="StoreFeeInOut" runat="server">
<Model>
<ext:Model ID="ModelFeeInOut" runat="server" IDProperty="Id">
<Fields>
<ext:ModelField Name="Name" Type="String" Mapping="Name" />
<ext:ModelField Name="Id" Type="String" Mapping="Id" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
</IWControl:iComboBox>
</Items>
</ext:FieldSet>
<ext:GridPanel ID="IGrid1stPartyFee" runat="server" Header="false" Height="75"
EnableColumnMove="false" TabMenuHidden="true" MarginSpec="0 0 10 5">
<Store>
<ext:Store ID="Store1stPartyFee" runat="server" RemoteFilter="true" PageSize="2">
<Model>
<ext:Model ID="Model1stPartyFee" runat="server" IDProperty="ID">
<Fields>
<ext:ModelField Name="ID" />
<ext:ModelField Name="Fee_Code" />
<ext:ModelField Name="FeeTypeName" />
<ext:ModelField Name="Value" />
<ext:ModelField Name="PaymentTypeName" />
<ext:ModelField Name="Remarks" />
<ext:ModelField Name="Status" />
</Fields>
</ext:Model>
</Model>
<Sorters>
</Sorters>
</ext:Store>
</Store>
<ColumnModel ID="Column1stPartyFee" runat="server">
<Columns>
<ext:Column ID="ColFeeType" runat="server" Text="Fee Type" Sortable="true"
DataIndex="FeeTypeName" Flex="1">
</ext:Column>
<ext:Column ID="ColValue" runat="server" Text="Value" Sortable="true" DataIndex="Value"
Flex="1">
</ext:Column>
<ext:Column ID="ColPaymentType" runat="server" Text="Payment Type" Sortable="true" DataIndex="PaymentTypeName"
Flex="1">
</ext:Column>
<ext:Column ID="ColRemarks" runat="server" Text="Remarks" DataIndex="Remarks"
Flex="1">
</ext:Column>
</Columns>
</ColumnModel>
</ext:GridPanel>
<ext:FieldSet ID="FFeechgs" runat="server" ColumnWidth="1" Layout="ColumnLayout" Cls="myform">
<Items>
<IWControl:iTextField ID="txtFirstLRChgs" runat="server" FieldLabel="LR Charges" ColumnWidth="0.25" MarginSpec="5 10 0 10" TabIndex="4438"
MaxLength="8" EnforceMaxLength="true" ReadOnly="true" MaskRe="/[0-9\$]/" FieldStyle="background-color: #ddd" IsRemoteValidation="true">
<RemoteValidation OnValidation="RemDecimalPrecision" />
</IWControl:iTextField>
<ext:RadioGroup ID="rdoGrFirstLR" runat="server" ColumnWidth="0.2" MsgTarget="Side" TabIndex="4439" MarginSpec="5 0 0 0" IndicatorCls="red-text">
<Items>
<ext:Radio ID="rdoFirstLRIn" runat="server" BoxLabel="In"></ext:Radio>
<ext:Radio ID="rdoFirstLROut" runat="server" BoxLabel="Out"></ext:Radio>
</Items>
</ext:RadioGroup>
<IWControl:iTextField ID="txtFirstOthChgs" runat="server" FieldLabel="Other Charges" ColumnWidth="0.25" MarginSpec="5 10 0 10" TabIndex="4440"
MaxLength="8" ReadOnly="true" EnforceMaxLength="true" MaskRe="/[0-9\$]/" FieldStyle="background-color: #ddd" IsRemoteValidation="true">
<RemoteValidation OnValidation="RemDecimalPrecision" />
</IWControl:iTextField>
<ext:RadioGroup ID="rdoGrFirstOth" runat="server" ColumnWidth="0.2" MsgTarget="Side" TabIndex="4441" MarginSpec="5 0 0 0" IndicatorCls="red-text">
<Items>
<ext:Radio ID="rdoFirstOthIn" runat="server" BoxLabel="In"></ext:Radio>
<ext:Radio ID="rdoFirstOthOut" runat="server" BoxLabel="Out"></ext:Radio>
</Items>
</ext:RadioGroup>
</Items>
</ext:FieldSet>
<ext:FieldSet ID="FFeeDet1" runat="server" ColumnWidth="1" Layout="ColumnLayout" Cls="myform">
<Items>
<IWControl:iComboBox ID="SecFeeStructureDDl" runat="server" FieldLabel="2nd Party" ColumnWidth="0.5" MarginSpec="0 5 0 10"
DisplayField="Name" AllowBlank="false" IndicatorText="*" IndicatorCls="red-text" TabIndex="4442"
MsgTarget="Side" EmptyText="Select Fee Structure" ValueField="Id" TriggerAction="All"
QueryMode="Local">
<Store>
<ext:Store ID="StoreSecFeeStructure" runat="server">
<Model>
<ext:Model ID="ModelSecFeeStructure" runat="server" IDProperty="Id">
<Fields>
<ext:ModelField Name="Name" Type="String" Mapping="Name" />
<ext:ModelField Name="Id" Type="String" Mapping="Id" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<Listeners>
<Select Handler="App.direct.FillFeeDetGrid1();" />
</Listeners>
</IWControl:iComboBox>
<IWControl:iComboBox ID="Fee2ndInOutDDl" runat="server" ColumnWidth="0.4" MarginSpec="0 5 0 0"
DisplayField="Name" IndicatorText="*" IndicatorCls="red-text" TabIndex="4443"
MsgTarget="Side" EmptyText="Fees In/Out From" ValueField="Id" TriggerAction="All"
QueryMode="Local">
<Store>
<ext:Store ID="Store2ndFeeInOut" runat="server">
<Model>
<ext:Model ID="Model2ndFeeInOut" runat="server" IDProperty="Id">
<Fields>
<ext:ModelField Name="Name" Type="String" Mapping="Name" />
<ext:ModelField Name="Id" Type="String" Mapping="Id" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
</IWControl:iComboBox>
</Items>
</ext:FieldSet>
<ext:GridPanel ID="IGrid2ndPartyFee" runat="server" Header="false" Height="75"
EnableColumnMove="false" TabMenuHidden="true" MarginSpec="0 0 10 5">
<Store>
<ext:Store ID="Store2ndPartyFee" runat="server" RemoteFilter="true" PageSize="2">
<Model>
<ext:Model ID="Model2ndPartyFee" runat="server" IDProperty="ID">
<Fields>
<ext:ModelField Name="ID" />
<ext:ModelField Name="Fee_Code" />
<ext:ModelField Name="FeeTypeName" />
<ext:ModelField Name="Value" />
<ext:ModelField Name="PaymentTypeName" />
<ext:ModelField Name="Remarks" />
<ext:ModelField Name="Status" />
</Fields>
</ext:Model>
</Model>
<Sorters>
</Sorters>
</ext:Store>
</Store>
<ColumnModel ID="Column2ndPartyFee" runat="server">
<Columns>
<ext:Column ID="Col2ndFeeType" runat="server" Text="Fee Type" Sortable="true"
DataIndex="FeeTypeName" Flex="1">
</ext:Column>
<ext:Column ID="Col2ndValue" runat="server" Text="Value" Sortable="true" DataIndex="Value"
Flex="1">
</ext:Column>
<ext:Column ID="Col2ndPaymentType" runat="server" Text="Payment Type" Sortable="true" DataIndex="PaymentTypeName"
Flex="1">
</ext:Column>
<ext:Column ID="Col2ndRemarks" runat="server" Text="Remarks" DataIndex="Remarks"
Flex="1">
</ext:Column>
</Columns>
</ColumnModel>
</ext:GridPanel>
<ext:FieldSet ID="F2ndFeechgs" runat="server" ColumnWidth="1" Layout="ColumnLayout" Cls="myform">
<Items>
<IWControl:iTextField ID="txtSecLRChgs" runat="server" FieldLabel="LR Charges" ColumnWidth="0.25" MarginSpec="5 10 0 10"
MaxLength="8" ReadOnly="true" EnforceMaxLength="true" MaskRe="/[0-9\$]/" FieldStyle="background-color: #ddd" TabIndex="4444" IsRemoteValidation="true">
<RemoteValidation OnValidation="RemDecimalPrecision" />
</IWControl:iTextField>
<ext:RadioGroup ID="rdoGrSecLR" runat="server" ColumnWidth="0.2" MsgTarget="Side" MarginSpec="5 0 0 0" IndicatorCls="red-text" TabIndex="4445">
<Items>
<ext:Radio ID="rdoSecLRIn" runat="server" BoxLabel="In"></ext:Radio>
<ext:Radio ID="rdoSecLROut" runat="server" BoxLabel="Out"></ext:Radio>
</Items>
</ext:RadioGroup>
<IWControl:iTextField ID="txtSecOthChgs" runat="server" FieldLabel="Other Charges" ColumnWidth="0.25" MarginSpec="5 10 0 10" TabIndex="4446"
MaxLength="8" EnforceMaxLength="true" ReadOnly="true" MaskRe="/[0-9\$]/" FieldStyle="background-color: #ddd" IsRemoteValidation="true">
<RemoteValidation OnValidation="RemDecimalPrecision" />
</IWControl:iTextField>
<ext:RadioGroup ID="rdoGrSecOth" runat="server" ColumnWidth="0.2" MsgTarget="Side" MarginSpec="5 0 0 0" IndicatorCls="red-text" TabIndex="4447">
<Items>
<ext:Radio ID="rdoSecOthIn" runat="server" BoxLabel="In"></ext:Radio>
<ext:Radio ID="rdoSecOthOut" runat="server" BoxLabel="Out"></ext:Radio>
</Items>
</ext:RadioGroup>
</Items>
</ext:FieldSet>
<ext:FieldSet ID="F2ndFeechgs1" runat="server" ColumnWidth="1" Layout="ColumnLayout" >
<Items>
<IWControl:iTextField ID="txtFeeRemarks" runat="server" FieldLabel="Remarks" TabIndex="4448"
MaxLength="500" EnforceMaxLength="true" ColumnWidth="0.6" MarginSpec="0 0 0 10">
</IWControl:iTextField>
<ext:Button ID="btnInvFeeSave" runat="server" Text="SUBMIT" Icon="Disk" TabIndex="4449">
<DirectEvents>
<Click OnEvent="SaveFeeClick" Before="return #{FormPanFee}.isValid();">
</Click>
</DirectEvents>
</ext:Button>
</Items>
</ext:FieldSet>
</Items>
</ext:FieldSet>
</Items>
</ext:FormPanel>


protected void SaveFeeClick(object sender, DirectEventArgs e)
{
////Saving my records here..
}

fabricio.murta
Feb 29, 2016, 12:06 PM
Hello AshwiniRane!

I don't recognize these IWControl:iComboBox as Ext.NET controls. Can you provide a sample without extraneous components so we can fully reproduce your test case and issue on our side?