Dec 04, 2014, 11:41 AM
[CLOSED] FormPanel, Validation of a Grid's Component Column
Hi all
See this Code
Is there a way to 'include' the Grid Rows in the validity Check ?
Thanks
Peter
See this Code
<ext:FormPanel ID="pnlPackaging" runat="server" Header="false" Layout="FitLayout">
<Items>
<ext:GridPanel runat="server" ID="gridPackaging" AutoScroll="true">
<Store>
<ext:Store ID="storePackaging" runat="server">
<Model>
<ext:Model ID="modelPackaging" runat="server">
<Fields>
<ext:ModelField Name="Id" />
<ext:ModelField Name="Quantity" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column ID="colId" runat="server" DataIndex="Id" Text="Id" Width="100" Hidden="True" Groupable="False" Sortable="False" MenuDisabled="True" />
<ext:ComponentColumn ID="colQuantity" runat="server" Editor="true" DataIndex="Quantity" Text="Quantity" Width="125" Hidden="False" Groupable="true" Sortable="False" MenuDisabled="False">
<Component>
<ext:TextField ID="fldPackageQuantity" runat="server" RegexText="Number (5)" Regex="^\d{0,5}$" />
</Component>
<Listeners>
<BeforeBind Handler="e.config[0].readOnly = !!this.grid.readOnly;" />
</Listeners>
</ext:ComponentColumn>
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModelPackaging" runat="server" Mode="Single" />
</SelectionModel>
</ext:GridPanel>
</Items>
</ext:FormPanel>
I check the FormPanels Validity:Ext.getCmp('pnlPackaging').getForm().isValid()
and the result is 'true' even if a Grid Row 'Quantity' (fldPackageQuantity) has a Validation Error...Is there a way to 'include' the Grid Rows in the validity Check ?
Thanks
Peter
Last edited by Daniil; Dec 10, 2014 at 9:56 AM.
Reason: [CLOSED]