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
710
How to "really" activate the template add row?
posted

I want to hook up a button that will move focus to the template add row and move the focus to the first cell to be edited so the user can type right away.

 If I use 

   TheGrid.Rows.TemplateAddRow.Activate();

The grid scrolls to the template add row, and the column indicators are changed to indicate that the user is now editing in the new reocrd.  But there is no cursor in any column.  i.e. the user can't type and still has to mouse click on a column before they can actually type something.

I tried the obvious, like activating a cell, but that is the same.  I tried selecting the contents of a cell, but that produced an error because its not in edit mode (or something like that).

 

thanks 

Parents
  • 710
    Verified Answer
    posted

     I think I found a solution.

     First I activate the the template add row, then the 1st editable cell in that row.  Then I use

    TheGrid..PerformAction(UltraGridAction.EnterEditMode);

    That seems to work.  Is that a good approach? 

     

Reply Children