[CLOSED] Insert Grid Record - Edit First Cell?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] Insert Grid Record - Edit First Cell?

    I've seen posts like http://forums.ext.net/showthread.php...cord-gridpanel whereby the row is focussed, but is it possible to actually have the grid go into edit mode (ie: as though I'd double-clicked on the cell)? Or, is this what is meant to happen?

    The code I've tried (in a function) is:

             
                insertGridRecord: function (grid, record, defaultEditCol, showErrors) {
                        var count = grid.getStore().getTotalCount();
                        grid.insertRecord(count, (record != null) ? record : {}, false);
                        grid.startEditing(count + 1, defaultEditCol || 0);
                        grid.selModel.selectRow(0);
                }
    .. this does everything I expect, except the row never goes into edit mode; it is just highlighted. Am I doing something wrong? I'm calling the code thus:

    <ext:Button ID="btnNew" runat="server" Text="New" Icon="Add">
        <Listeners>
            <Click Handler="SaveAndInvest.insertGridRecord(#{gridChequeDiaries}, { ReconciledStatus:'Draft' }, 0);" />
        </Listeners>
    </ext:Button>
    Many thanks.
    Last edited by Daniil; May 17, 2011 at 1:59 PM. Reason: [CLOSED]

Similar Threads

  1. Replies: 4
    Last Post: Oct 07, 2011, 10:49 AM
  2. [CLOSED] insert record
    By 78fede78 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 12, 2010, 4:08 PM
  3. [CLOSED] I can not edit inserted record in a grid.
    By flormariafr in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 03, 2010, 8:20 PM
  4. [CLOSED] Insert Record into grid
    By sharif in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 08, 2010, 2:16 PM
  5. Replies: 0
    Last Post: Sep 17, 2009, 8:04 AM

Tags for this Thread

Posting Permissions