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,
ADAdministrator Syncfusion Team October 12, 2002 06:49 AM UTC
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)
RMRollan MoskoOctober 14, 2002 12:53 PM UTC
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.