when we do tabbing we are not able to get focus on gridview
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
- 1 Reply
- 2 Participants
-
RA Rakesh Advani
- Aug 10, 2015 05:51 AM UTC
- Aug 11, 2015 08:35 AM UTC