Oct 16, 2010, 6:35 AM
GridPanel Editor :- Stop editing on enter key
Hi,
I have a grid panel with Combobox Editor. Currently when we select an item from list and press enter the pointer moves to next row and starts editing there.
I want to overwrite this functionality.
I tried this but its not working
Regards,
Vivek Rane
I have a grid panel with Combobox Editor. Currently when we select an item from list and press enter the pointer moves to next row and starts editing there.
I want to overwrite this functionality.
I tried this but its not working
<ext:Column ColumnID="colStockAcc" DataIndex="companyname" Header="Stock Ac" Sortable="false" Width="200">
<Editor>
<ext:ComboBox runat="server" ID="cmbInvGoodsCompanyCode" AllowBlank="false" StoreID="stStockAcc"
DisplayField="companyname" ValueField="companycode" Mode="Local" Editable="true" ForceSelection="true" TriggerAction="All" SelectOnFocus="true" TypeAhead="true" TabIndex="1" EnableKeyEvents="true">
<Listeners>
<Select Handler="setCellValue(#{gpInvoiceGoods},#{stInvoiceGoods}.indexOf(#{gpInvoiceGoods}.getSelectionModel().getSelected()),1,this.getValue())" />
<KeyDown Handler="if(e.getKey()==13){alert('Inside if');#{gpInvoiceGoods}.selModel.selectNext();#{gpInvoiceGoods}.stopEditing();}" />
</Listeners>
<SelectedItem Value="companycode" />
</ext:ComboBox>
</Editor>
<EditorOptions CancelOnBlur="true" />
</ext:Column>
How can we implement this functionality??Regards,
Vivek Rane