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
445
Enter key for row updating
posted

Hi,

I need the webdatagrid's  row updating to work when I press the enter key. It works now when I press the key twice, but I want it to work with single press.

It's working very well for row adding but not for row updating

I tried for some work arounds like editing behaviour's commit. But Commit doesn't trigger me the post back.

However help me find a way to make it work with single enter key press.

Parents
  • 71886
    Offline posted

    Hi Nagaraj,

    I tried this in a sample with a presumed settings for the Behaviors of the grid:

                <Behaviors>
                    <ig:Activation />
                    <ig:Selection RowSelectType="Multiple" CellClickAction="Row" />
                    <ig:EditingCore>
                        <Behaviors>
                            <ig:CellEditing Enabled="true">
                                <CellEditingClientEvents ExitedEditMode="WebDataGrid1_CellEditing_ExitedEditMode" />
                                <EditModeActions EnableF2="true" EnableOnActive="true" MouseClick="Single" />
                                <ColumnSettings>
                                    <ig:EditingColumnSetting ColumnKey="Dosage" ReadOnly="true" />
                                </ColumnSettings>
                            </ig:CellEditing>
                        </Behaviors>
                    </ig:EditingCore>
                </Behaviors>

    and the CellEditing event function:

    function WebDataGrid1_CellEditing_ExitedEditMode(sender, eventArgs)
    {
        sender.get_behaviors().get_editingCore().commit();
    }

    and that worked fine for me, it's making a request.

    Please try out what I have prepared and see if it works for you. If that's what you want and you cannot incorporate it in your project, please do share a sample where I can try and make this work.

    I will be waiting for your feedback.

    WDGCommitEnter.zip
Reply Children