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.
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.
Hi,
Thanks.. I need the sample code for this.... i tried the begininvoke method, but i am not getting the output properly.
Please provide the sample code using the begininvoke method for activating the form