Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
625
iggrid edit dialog enter key to submit
posted

Hi
I am using iggrid edit dialog
     

    datagrid = {
        width: "99%",
        height:"600px",
        primaryKey: "RowKey",
        columns: GridColumnData,
        dataSource: GridData,
        autoCommit: true,
        autoGenerateColumns: false,
        autofitLastColumn: false,
        features: [
        {
            name: "Paging",
            type: "local",
            pageSize: 10,
            pageSizeList: [10, 20, 25, 50, 75, 100],
            pageSizeDropDownLocation: "inpager"
        },
        {
            name: "Sorting",
            type: "local"
        },

        {
            name: "Resizing"
        },
        {
            name: "Updating",
            editMode: "dialog",
            enableAddRow: false,
            enableDeleteRow: false,
            columnSettings: [
            {
                columnKey: "RowKey",
                readyOnly: true,
                editorOptions: { type: "string", disabled: true}
            },
            {
                columnKey: "Command",
                readyOnly: true,
                editorOptions: { type: "string", disabled: true}
            },                    
            {
                columnKey: "LastScheduledExecutionDateTime",
                readyOnly: true,
                editorOptions: { type: "string", disabled: true}
            }
            ]
        }
        ]
    }

    $("#iggrid").igGrid(datagrid);


    $(document).delegate("#iggrid", "iggridupdatingeditrowended", function (evt, ui) {
        if (ui.update) {

           --- update AJAX code ---
        }
    });

1. I change the value and press enter in first time the values is change the grid only not updated/call ajax function.

2. Then again i change the value and click Done button the ajax call and values updated

3. I am not refresh the page at the same time i change the value again i press enter it works

Any one please help me. At the first time i am not able to update using press enter.

When i open edit dialog click cancel it comes in delegate function not comes in ui.update function then again open dialog change value press enter it works.

Thanks in Advance

Robin Bronston D

  • 23953
    Offline posted

    Hello Robin,

    I'm not sure I understand your issue.

    Pressing the Enter key when there are changes and the "Done" button is enabled will close the dialog accepting the changes and will trigger igGridUpdating.editRowEnded event. The ui.update flag indicates whether the user made some changes to the record, so its normal to be false when the "Cancel" button is clicked.

    If I understand correctly you're saying that the first time you edit a row and press Enter ui.update is false. I cannot reproduce such scenario. Can you please clarify your issue.

     
    Thanks in advance,
    Martin Pavlov
    Infragistics, Inc.