Aug 02, 2011, 10:33 AM
Edit fild in grid panel only if checkbox selected
Hi
i have gridpanel and checkbox and in this grid panel i have editor
i want when i selectet the checkbox the field become editable not always
is it possible???
this is my gridpanel
i have gridpanel and checkbox and in this grid panel i have editor
i want when i selectet the checkbox the field become editable not always
is it possible???
this is my gridpanel
<ext:GridPanel
ID="GridPanel1"
runat="server"
Height="300"
Title="Liste des fournisseurs"
StripeRows="true"
>
<Store>
<ext:Store ID="Store1" runat="server" SerializationMode="Complex" >
<Reader>
<ext:JsonReader IDProperty="FournisseurId">
<Fields>
<ext:RecordField Name="FournisseurId" />
<ext:RecordField Name="FournisseurRaisonSocial" />
<ext:RecordField Name="PrixUnitaireProduit" />
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Store>
<Listeners>
<KeyDown Fn="startEditing" />
<AfterEdit Fn="afterEdit" />
</Listeners>
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<%--<ext:Column Header="FournisseurId" DataIndex="FournisseurId" Width= "400" /> --%>
<ext:Column Header="Raison sociale" DataIndex="FournisseurRaisonSocial" Width= "400" />
<ext:Column ColumnID="PrixUnitaireProduit" DataIndex="PrixUnitaireProduit" Header="Prix unitaire produit" Width= "400">
<Editor>
<ext:TextField runat="server" />
</Editor>
</ext:Column>
</Columns>
</ColumnModel>
<LoadMask ShowMask="true" />
<SelectionModel>
<ext:CheckboxSelectionModel ID="CheckboxSelectionModel1" runat="server" MoveEditorOnEnter="false" >
</ext:CheckboxSelectionModel>
</SelectionModel>
<LoadMask ShowMask="true" />
<BottomBar>
<ext:PagingToolbar ID="PagingToolbar1" runat="server" PageSize="10">
<Items>
<ext:Label ID="Label2" runat="server" Text="Page size:" />
<ext:ToolbarSpacer ID="ToolbarSpacer1" runat="server" Width="10" />
<ext:ComboBox ID="ComboBox1" runat="server" Width="80">
<Items>
<ext:ListItem Text="1" />
<ext:ListItem Text="2" />
<ext:ListItem Text="10" />
<ext:ListItem Text="20" />
</Items>
<SelectedItem Value="10" />
<Listeners>
<Select Handler="#{PagingToolbar1}.pageSize = parseInt(this.getValue()); #{PagingToolbar1}.doLoad();" />
</Listeners>
</ext:ComboBox>
</Items>
</ext:PagingToolbar>
</BottomBar>
</ext:GridPanel>