I have some code in a DoubleClick event. I want to automatically call that event when the user enters another grid cell. So I am doing the following in the AfterCellActivate event
Grid_DoubleClick(Me, Infragistics.Win.UltraWinGrid.DoubleClickCellEventArgs.Empty)
However, when this code is executed, I get the following error message:
Unable to cast object of type "System.EventArgs" to "Infragistics.Win.UltraWinGrid.DoubleClickCellEventArgs".
I don't understand this error message. First, I'm not sending a System.EventsArg. Second, the signature for the DoubleClick event requires the Infragistics.Win.UltraWinGrid.DoubleClickCellEventArgs which I'm sending.
So why am I getting this error message.
Thanks
Hi sch,
I have constructed a sample to investigate this behavior with the proper context; however, I have been unsuccessful in producing the behavior that you have described.
The behavior that I am observing is in fact exactly as would be expected, wherein the DoubleClick event is triggered whenever the user selects another cell or double clicks on the grid’s surface.
I have attached the sample that I have created for investigating this issue, please take a look to ensure that your code mirrors that in the sample.
If you are still experiencing this issue after reviewing the sample and/or modifying your code if it was needed at all, I would gladly take a look at your project; if you are able to provide a sample that I may review.
If you have any further questions regarding this issue, please let me know.
Sincerely,Chris KDeveloper Support EngineerInfragistics, Inc.www.infragistics.com/support
Hi Chris
I posted my version of the problem a few days ago. So far I haven't heard anything. Any resolution to my issue?
I tried your program, and I did not get my error message. So I am attaching a zip file of my version, which does give the error message. My version is using v10.2 of the wingrid.
When you run the program, enter anything (i.e. 12345) in the grids first column, press tab, enter anything numeric (i.e. 12) in the second column, and press tab. The program will then generate my error message.
I hope this shows my issue.