We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

when we do tabbing we are not able to get focus on gridview

In currently when we do ALT + J we are getting focus but we want focus while doing tabbing. on gridview

http://jsplayground.syncfusion.com/ybhhh15l

here we are proving example for your better understanding.
press ALT +j then Ctrl+home

We want same functionality using tab. is your controller provide that functionality.? .


1 Reply

PK Prasanna Kumar Viswanathan Syncfusion Team August 11, 2015 08:35 AM UTC

Hi Rakesh,

Thanks for using Syncfusion products.

To focus the Grid while tabbing, we created a sample in which the Grid rendering inside the tabs. We used the event itemActive of ejTab that triggers while tabbing and focused the grid by using jQuery focus method.

Please find the following code example and sample:

<div id="ExcelGrid" title="User Tasks">

            <ul>

                <li><a rel='nofollow' href="#plannedTab">Planned</a></li>

                <li><a rel='nofollow' href="#Div1">Planned</a></li>

            </ul>

            <div id="plannedTab">

                <div id="Grid1" style="margin-top:15px; margin-left:100px"></div>

            </div>

            <div id="Div1">

                <div id="Div2" style="margin-top:15px; margin-left:100px"></div>

            </div>

        </div>

    <script type="text/javascript">

            $("#ExcelGrid").ejTab({

                itemActive: "create" ,// Event to render the grid in tabd

            });


                $("#Grid1").ejGrid({

//Render Planned tab grid

                    dataSource: window.gridData, //Using data from json Array

                    allowPaging: true,

                    editSettings: { allowEditing: true, allowAdding: true, allowDeleting: true },

                    columns: [

                        { field: "OrderID", headerText: "Order ID", isPrimaryKey: true },

                        { field: "CustomerID", headerText: "Customer ID" },

                        { field: "Freight", headerText: "Freight" },

                        { field: "ShipCity", headerText: "ShipCity" }

                    ],

                });

            $("#Div2").ejGrid({

                //Render Planned tab grid

                dataSource: window.gridData, //Using data from json Array

                allowPaging: true,

                allowKeyboardNavigation: true,

                columns: [

                    { field: "OrderID", headerText: "Order ID", isPrimaryKey: true },

                    { field: "CustomerID", headerText: "Customer ID" },

                    { field: "EmployeeID", headerText: "EmployeeID" },

                    { field: "ShipCountry", headerText: "ShipCountry" }

                ],

            });


     function create(args) {

         $("#Div2").focus();
     }

 
Sample Link : http://www.syncfusion.com/downloads/support/forum/119874/ze/JSTabGrid-1249942576

If we misunderstood your query, please get back to us, we will be happy to assist you.

Please let me know if you need any further assistance.

Regards,
Prasanna Kumar N.S.V

Loader.
Up arrow icon