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
145
Hitting enter while editing exits edit mode.
posted

Step#1 - A user sees a Infragistics 11.2 webdatagrid in batch mode.

Step #2 - A user clicks on a cell to edit some data.

Step #3 - The user enters some text on the keyboard and hits enter.

Step #4 - The user tries to keep typing but the edit mode has exited. Is there a setting to keep the cell in edit mode and save the cr/lf from the pressed enter key in the data?

Thanks

p.s. c#, .net 3.5, webdatagrid, BatchUpdating="True"

Parents
No Data
Reply
  • 8160
    posted

    Hello,

    as far as I can understand you don't want to exit from edit mode after press Enter.

    Option #1: Handle ExitingEditMode client event and cancel it if Enter is pressed:


          function WebDataGrid1_CellEditing_ExitingEditMode(sender, eventArgs) {
                if (eventArgs.get_browserEvent().keyCode == 13) {
                    eventArgs.set_cancel(true);
                }
            }

    Option #2: Use TextBoxProvider, this will allow you to enter multi line text. I recommend you to use this option


     <EditorProviders>
                <ig:TextBoxProvider ID="WebDataGrid1_TextBoxProvider1" EditorControl-TextMode="MultiLine">
                    <EditorControl ClientIDMode="Predictable" ></EditorControl>
                </ig:TextBoxProvider>
            </EditorProviders>

    Let me know if you need further assistance

Children