Welcome Guest Search | Active Topics | Sign In | Register

Mouse wheel scroll not working in Grid Options
steved
Posted: Monday, February 6, 2012 8:07:25 AM
Rank: Member
Groups: Member

Joined: 2/6/2012
Posts: 13
Hello,

I have a Grid with all the usual code behind done for populating the grid on a server side callback. I have added some javascript as per your product demo to trap a full row item select (FullRowMode=true) to fire a server side event. That all works fine however the scroll wheel on the mouse doesn't scroll the grid items, but if I set the FullRowMode=false it does scroll fine but I need full row selection as I need to ensure the whole row when clicked is highlighted not just the cell that is clicked.
eo_support
Posted: Monday, February 6, 2012 12:37:51 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

The reason that mouse wheel does not work is because the Grid does not have focus. The reason that the Grid does not have focus is because as soon as you click it, you fire a server event. So you have to have some other ways to set the focus to the Grid first. One thing you can try is to manually call the Grid's focus method whent he Grid finishes loading. It will be something like this:

Code: HTML/ASPX
<eo:Grid ID="Grid1" ClientSideOnLoad="focus_grid" .....>
.....
</eo:Grid>


Code: JavaScript
function focus_grid()
{
    eo_GetObject("Grid1").focus();
}


Please let us know if this works for you.

Thanks!
steved
Posted: Tuesday, February 7, 2012 3:47:40 AM
Rank: Member
Groups: Member

Joined: 2/6/2012
Posts: 13
Many thanks - yes that works fine. Is there a way to have the keyboard up/down arrow keys to scroll the grid as well and press enter to fire the event as if the row was mouse clicked ?.
eo_support
Posted: Tuesday, February 7, 2012 9:36:42 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Arrow key is supported automatically if you set the Grid's EnableKeyboardNavigation to true. The Grid also automatically handles enter key if the cell is in edit mode. However if you wish to handle enter key on any cell (such as read only cell), then you will need to trap enter key yourself. Inside your own event handler you can then raises server event either through the Grid by calling the Grid's raiseItemCommandEvent method:

http://www.essentialobjects.com/doc/1/jsdoc.public.grid.raiseitemcommandevent.aspx

Or use any other approach to raises server event. We also have a ScriptEvent control that you can use to raise server event:

http://www.essentialobjects.com/doc/1/eo.web.scriptevent.aspx

Hope this helps.

Thanks!
steved
Posted: Tuesday, February 7, 2012 11:08:32 AM
Rank: Member
Groups: Member

Joined: 2/6/2012
Posts: 13
Many thanks for your help. Will try.


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.