EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: rezzonico on August 20, 2015, 08:13:03 AM



Title: Up and Down key in a datagrid
Post by: rezzonico on August 20, 2015, 08:13:03 AM
Hi all,

in order to use the Up and Down key in a datagrid I have found the following code:
http://www.jeasyui.com/forum/index.php?topic=483.0

Unfortunately it doesn't work for me.
I am using "jQuery EasyUI 1.4.2"
Can this be the problem or should this code work also with 1.4.2 ?

Thanks for any help
Miche


Title: Re: Up and Down key in a datagrid
Post by: stworthy on August 20, 2015, 05:37:32 PM
It works well, please refer to http://jsfiddle.net/wkq7khry/


Title: Re: Up and Down key in a datagrid
Post by: rezzonico on August 21, 2015, 05:56:24 AM
Hi stworthy,

thanks a lot for your help !
Looking at your example I found my mistake.

Unfortunately now I have a problem that I cannot solve.
If you can help me ...

This is your code and it works perfectly:
http://195.144.40.170/AAA/file1.html


First problem
------------
I have changed the following line:
data-options="singleSelect:true,collapsible:true,data:data">
with:
data-options="singleSelect:true,collapsible:true,data:data,idField:'itemid'">
As you can see in the following link key-up/key-down initially work but after reaching the first/last line the yellow line disappears.
http://195.144.40.170/AAA/file2.html


Second problem
---------------
I have changed the following line:
data-options="singleSelect:true,collapsible:true,data:data">
with:
data-options="singleSelect:true,collapsible:true,url:'datagrid_data.json'">
As you can see in the following link the instruction "p.focus();" do not work
http://195.144.40.170/AAA/file3.html


Thanks for any help.
Miche