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
1015
Generating a WinGrid DoubleClick event
posted

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

Parents
  • 4618
    posted

    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 K
    Developer Support Engineer
    Infragistics, Inc.
    www.infragistics.com/support

    CallEventWhenCellActivates92625VB.zip
Reply Children