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
530
Setting Focus to a Cell in the ActiveRecord by column name its bound to
posted

Is there  a way to set focus to a Cell in the ActiveRecord by column name its bound to?  We have some background validation logic that finds errors in the current record before it's committed.  I would like to be able to set the current ActiveCell of the CurrentRecord based on the data column name from our validator.  I can iterate through the fields collection and find the field, but I'm not sure what I do with it once I have it to set the focus.

Parents
  • 69686
    Verified Answer
    posted

    Hello,

    So you have the name of the cell and you iterate through the cells of the current record.

    Once gotten to the particular cell, you can set it to Active and use StartEditMode command on the XamDataGrid, which will bring the active cell into edit mode, like this:

    ...

    cell.IsActive = true;

    xamDataGrid.ExecuteCommand(DataPresenterCommands.StartEditMode);

Reply Children
No Data