Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
How to set Focus on webdatagrid row selection
posted

I'm able to get the selected row from the server side. But when I press tab key it is focusing next cell but the expected behavior is to focus the next control. I have used Template data field for bounding columns in the webdatagrid.

Please help me to find the solution.

Thanks in advance!!!!!

  • 1560
    Offline posted

    Hello,


    I have been looking into your question and prepared a small sample in order to demonstrate how such behavior could be achieved.


    By design, pressing tab/shift+tab is activating the grid's cells which will also set their tabindex to 0.  In order to override this behavior, you should cancel the activation on Tab keydown and set the required next/previous element which should be focused. In addition, since each time cell is activated this would still change its tabindex to 0, you should also set it back to -1 in order to prevent the focus on it.


    Please test the attached sample on your side and let me know if I may be of any further assistance.


    Sincerely,
    Teodosia Hristodorova
    Associate Software Developer

    6242.WDG_tab_behavior.zip