GridPanel Editor :- Stop editing on enter key

  1. #1

    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

    
    <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
  2. #2

    Mark as solved

    I solved it.

    Please mark as solved

    regards,
    Vivek Rane
  3. #3
    Hi,

    For anyone who is interested. It can be solved by:
    <ext:RowSelectionModel runat="server" MoveEditorOnEnter="false"/>

Similar Threads

  1. Replies: 6
    Last Post: Oct 13, 2011, 9:51 PM
  2. [CLOSED] Programatically start editing and set value of editor
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 25, 2010, 11:17 AM
  3. Replies: 0
    Last Post: Sep 10, 2009, 8:59 AM
  4. Stop Enter event on grid update
    By BrunoC in forum 1.x Help
    Replies: 0
    Last Post: Apr 23, 2009, 11:25 AM
  5. Replies: 0
    Last Post: Feb 12, 2009, 6:38 AM

Posting Permissions