EasyUI
Home
Demo
Tutorial
Documentation
Download
Extension
Contact
Forum
EasyUI Forum
May 16, 2024, 10:27:12 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
:
Home
Help
Search
Login
Register
EasyUI Forum
>
General Category
>
EasyUI for jQuery
>
How to set focus on datagrid
Pages: [
1
]
« previous
next »
Print
Author
Topic: How to set focus on datagrid (Read 4976 times)
pratikk
Newbie
Posts: 49
How to set focus on datagrid
«
on:
January 26, 2019, 04:29:52 AM »
I want to focus on each element in the form by using tab and shift tab keys. But I can't get focus to datagrid.
«
Last Edit: January 26, 2019, 11:08:56 PM by pratikk
»
Logged
jarry
Administrator
Hero Member
Posts: 2264
Re: How to set focus on datagrid
«
Reply #1 on:
January 27, 2019, 01:26:02 AM »
Set the 'tabindex' attribute for the datagrid panel.
Code:
var p = $('#dg').datagrid('getPanel');
p.attr('tabindex', 1).css('outline-style','none');
Logged
pratikk
Newbie
Posts: 49
Re: How to set focus on datagrid
«
Reply #2 on:
January 27, 2019, 02:15:52 AM »
It's not getting focus to datagrid when I use tab keys. Nothing changed. Only when I click on the datagrid , the striped lines get thr focus color which is yellow as seen on the picture
«
Last Edit: January 27, 2019, 02:22:48 AM by pratikk
»
Logged
jarry
Administrator
Hero Member
Posts: 2264
Re: How to set focus on datagrid
«
Reply #3 on:
January 27, 2019, 07:22:20 PM »
Please look at this example
http://code.reloado.com/izehaz4/edit#preview
. Press tab key to focus on next textbox and then datagrid panel.
Logged
pratikk
Newbie
Posts: 49
Re: How to set focus on datagrid
«
Reply #4 on:
January 28, 2019, 12:44:26 PM »
The reason why it didn't work is ; The tab key was restricted to focus on other than input fields. So I erased those lines and it is working. Thank you very much.
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> News
=> General Discussion
=> EasyUI for jQuery
=> EasyUI for Angular
=> EasyUI for Vue
=> EasyUI for React
=> Bug Report
Loading...