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
245
Child form not getting activated on the first click from the wingrid.
posted

I am using the wingrid in my form. In that grid we have a drop down column.If i change the drop down column, the child form will open.In that form i have to choose the data from the list box and click finish button to save the selected data.

i am able to open the form. But i am unable to select the data on the first click( The form is not getting activated on the first click).

I have tried this code in the  following event

 - ugrdWorkCard_AfterCellListCloseUp

 - ugrdWorkCard_CellChange

Both are not working.

Code

if (e.Cell.DataChanged)
                    {
                         if (cellValue == employee.mark)
                          {
  _fEPReason.TopMost = true;
                            _fEPReason.ShowDialog();
                          }

This above code is not working on the first click.

In the above i called all the default methods like activate, select, focus , bringtofront.. Nothing is working

Please provide the code to resolve this issue.

Help me to resolve this issue.

Thanks in advance.

Parents
  • 469350
    Offline posted

    If the first click on the dialog is not working, then my guess is that there's a MouseDown occurring without a MouseUp somewhere. This is probably just a timing issue.

    Instead of calling ShowDialog from directly inside the event of the grid, try using a BeginInvoke to call a method that shows the dialog and see if that helps.

Reply Children