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
1020
Bringing Focus on a cell ( with blinking cursor )
posted

Hi Friends,
In my UltraGrid I use the following code to set the active cell :-


ultraGridMass.ActiveCell = ultraGrid.Rows[0].Cells[1];

When I do this the cell gets focus but I can not directly edit the cell
before clicking it once with the mouse....I want to be able to directly start
editing the cell. How do i accomplish that ?
Looking for help...

Thanks
Sid.

Parents
  • 469350
    Suggested Answer
    Offline posted

    Hi Sid,

    In addition to setting the ActiveCell, you may need to set focus to the grid. Then you will need to call:

    grid.PerformAction(EnterEditMode)

    Note that this will not work in the Form_Load event, since you cannot set focus to a control inside that event. If that's the case, you may be able to work around it using a BeginInvoke.

Reply Children