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
3160
Best way to handle Tab key to XamDataGrid?
posted

http://es.infragistics.com/community/forums/t/23743.aspx

The above post is four versions old, and seems like a very complex solution for what seems to be a simple problem.   Is there a better way?

I have one XamDataGrid on a screen.  I want the user to be able to tab to it just like any other control on the screen.  When the grid receives the focus i want it to make row zero active and go into edit mode.  Seems simple enough....

Thank you

  • 30945
    Verified Answer
    Offline posted

    Hello Sam,

     

    Thank you for your post. I have been looking into the functionality that you are trying to achieve and I can suggest using the IsKeyboardFocusChanged event of the XamDataGrid, instead of GotFocus. In the event handler for this event, you can call the ExecuteCommand method of the XamDataGrid with CellFirstOverall command to activate the top left cell of the grid and then you can call the StartEditMode command to put the cell in edit mode. I have created a sample application for you, that shows how you can implement this approach.

     

    Please let me know if you need any further assistance on the matter.

     

    Sincerely,

    Krasimir

    Developer Support Engineer

    Infragistics

    www.infragistics.com/support

    EnterEditModeOnGotFocus.zip