Rad Grid Set Focus on row

2 posts, 0 answers
  1. Paolo
    Paolo avatar
    1 posts
    Member since:
    Sep 2014

    Posted 25 Sep 2014 Link to this post

    I've a rad grid and I want to set the focus on a specified row of the grid using javascript.

    I've done this function:

         function setActiveRow(p) {
             var grid = $find("<%=RadGridDati.ClientID%>");
             var masterTableView = grid.get_masterTableView();

    where p is the row number I want to set the focus.
    It's running correctly with Explorer but not with Firefox and Crome.
    Some ideas?

    Thanks in advan ce
  2. Jayesh Goyani
    Jayesh Goyani avatar
    2732 posts
    Member since:
    May 2010

    Posted 25 Sep 2014 in reply to Paolo Link to this post


    This method is a shortcut for .on( "focus", handler ) in the first and second variations, and .trigger( "focus" ) in the third.The focus event is sent to an element when it gains focus. This event is implicitly applicable to a limited set of elements, such as form elements (<input>, <select>, etc.) and links (<a href>). In recent browser versions, the event can be extended to include all element types by explicitly setting the element's tabindex property. An element can gain focus via keyboard commands, such as the Tab key, or by mouse clicks on the element.Elements with focus are usually highlighted in some way by the browser, for example with a dotted line surrounding the element. The focus is used to determine which element is the first to receive keyboard-related events.

    for more detail please check : focus()

    In short either you have to assign tabindex to column or you have to add text inside anchor tag. 

    Let me know if you have any concern.

    Jayesh Goyani
  3. DevCraft R3 2016 release webinar banner
Back to Top