We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Passing events to Form via user control

Thread ID:

Created:

Updated:

Platform:

Replies:

1290 Oct 11,2002 05:00 PM Oct 14,2002 08:53 AM Windows Forms 2
loading
Tags: GridControl
Rollan Mosko
Asked On October 11, 2002 05:00 PM

I made a user control containing a gridcontrol that I added handlers for nicely growing the right-most column and other stuff. My problem is that I want to pass events (like CellDoubleClick) to the parent form so the form can decide what to do. What do I have to do to my user control to make this happen? I made the grid control public, but I can't add the ..CellDoubleClick event handler in the parent form code (it thinks the grid control wasn't defined with 'With Events'. I made this member public and it does have with events in the definition so I'm unclear what the problem is. I attached code in case there's any questions. thanks a bunch, Rollan

Administrator [Syncfusion]
Replied On October 12, 2002 02:49 AM

Have you tried explicitly adding the handler by calling AddHandler? 'maybe in your OnLoad override, add AddHandler ctlGrid.grdInfo.CellDoubleClick, AddressOf HandleDClick '... Private Sub HandleDClick(ByVal sender as Object, ByVal e as GridCellClickEventArgs) 'do whatever.... End Sub

Rollan Mosko
Replied On October 14, 2002 08:53 AM

Hi Clay, That does the trick. I haven't had to add any handlers manually until now. I'll use this technique when I have similar problems in the future. thanks again, Rollan

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;