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
570
CSOM Help - Tab/Focus override
posted

I'm a new user to the Aikido framework, and I'm finding it pretty frustrating exploring the CSOM javascript functions.  All I want to do is to skip over a column when a user hits the tab.  I dont know of a way to control tabindex, therefore I figure I could control the ExitedEditMode event and manually skip over the column, but havent been able to execute it.  Any help is greatly appreciated.

Parents
  • 28464
    Verified Answer
    posted

     

    Hello,

    Indeed, WebDataGrid is quite different from UltraWebGrid both on the server and on the client, but the CSOM we employ is based entirely on the new standard Microsoft introduced in their ASP.NET AJAX client-side framework, so this is more or less the new standard for CSOM interaction. Maybe we need to document things a little bit better in examples and help -- point taken, we are working on that every day.

    In addition to the online resources, you can use the debugger; keyword to debug the javascript in browser in order to see all available methods and properties. Public properties start with get / set. Private methods and properties are typically prefixed with underscores.

    Here is a sample script for the task that you need to achieve (skip the second cell and go directly to third on exiting edit mode).

    <script type="text/javascript">

            function exitEdit(sender, args) {
                //debugger;
                var grid = $find("<%= WebDataGrid1.ClientID %>");
                var cell = args.getCell();
                var row = cell.get_row();
                var newEditCell = null;
               
                if (cell.get_index() == 0) {
                    newEditCell = row.get_cell(2);
                }

                if (newEditCell != null) {
                    var editingBehavior = grid.get_behaviors().get_editingCore().get_behaviors().get_cellEditing();
                   
                    // timeout needed to avoid entering exitEdit mode again - and end in recursion / stack overflow
                    window.setTimeout(function() {
                        editingBehavior.enterEditMode(newEditCell);
                    }, 200);
                   
                }       
            }
       
        </script>
       
        <div>
            <ig:WebDataGrid ID="WebDataGrid1" runat="server"
                DataSourceID="AccessDataSource1" Height="350px"
                oninitializerow="WebDataGrid1_InitializeRow" Width="400px" >
                <Behaviors>
                    <ig:EditingCore>
                        <Behaviors>
                            <ig:CellEditing>
                                <CellEditingClientEvents ExitingEditMode="exitEdit" />
                                <EditModeActions EnableOnActive="True" EnableOnKeyPress="True" />
                            </ig:CellEditing>
                        </Behaviors>
                    </ig:EditingCore>
                </Behaviors>
            </ig:WebDataGrid>
        </div>

    The CSOM is documented here online (online reference)

    http://help.infragistics.com/Help/NetAdvantage/NET/2008.3/CLR3.5/html/WebDataGrid~Infragistics.Web.UI_namespace.html

    HTH,

  • 12679
    posted in reply to Adrian

    Hello Adrian,

    Please check this out : CSOM  If you use 10.2 you are able to benefit from JavaScript intellisense support 

    Hope this helps

Reply Children