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
1445
Perform Action does not fire?
posted

I have a grid that I am doing ALOT of manipulation in the initializeRow event. One part of the routine is a foreach loop that goes through each cell in the row. I do a bunch of random things depening on what the value of the cell is. One issue I have, is when the form loads, the cursor is inot in the .Active cell.

This is what I do in order to make the cursor go into that cell..  Which worked for me on another screen. The cell is in edit mode.  When .PerformAction is called, it never goes into the BeforePerformAction event for the grid. Which makes me think, that is why I am not seeing the cursor in the cell. (All being done in InitializeRow event for the grid)  Any thoughts?

 

dc.Activate();

 

 

 

 

this.grdDeptStatsValues.PerformAction(UltraGridAction.EnterEditMode);

 

Parents
  • 469350
    Verified Answer
    Offline posted

    Hi,

    What event is this code in? And what is 'dc' in this case?

    You cannot set focus to a control inside of the Form_Load event or until the form has been fully loaded. So my guess is that you are calling PerformAction too early - at a point when the form is not ready to assign focus.

    This can often be alleviated by using a BeginInvoke to introduce a delay, rather than calling PerformAction or setting focus from directly inside the event.

Reply Children
No Data