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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Firing clicked event when user control with datboundgrid placed on form

Thread ID:





3041 Feb 27,2003 01:49 AM UTC Feb 27,2003 06:49 AM UTC WinForms 1
Tags: GridControl
Knut Vonheim
Asked On February 27, 2003 01:49 AM UTC

I apologize if this is a windows question and not a true grid question, but in that case I still hope someone could guide me in the right direction. What I want to achieve is have a click on the ucGrid trigger other functions on the parent form. However, that is not possible at design time and I hence am trying to fire a clicked event and compare new record vs old record to see if an update on the parent form is required. (I made a user control because I want to use it on several forms). If I understand the order of events correctly there is one of two things at play. Windows will not trigger a clicked event on the ucGrid1 instance on the form (which is obvious since when clicking on the grid (which fills the entire uc form) the CurrentCellActivated event on the grid is triggered if the cell changes, if CurrentCellActivated is not defined it triggers the Clicked event on the Grid. However, nothing triggers on the uc Form or the parent form where an instance of the uc resides as ucGrid1. If not a windows issue this must have somthing to do with the implementation of the databound grid - I would think? Unfortunately I am not a Windows programming expert and will hence greatly appreciate any guidance from this group! I have thought of a button on the form for retrieving the dependent data. I could create a parent child relationship on the form directly, but that would invalidate my attempt to create reusable User Controls. Other thoughts are greatly welcomed! Thanks, Knut Vonheim

Administrator [Syncfusion]
Replied On February 27, 2003 06:49 AM UTC

Can you add a new event to your user control to which your form can listen? You could fire this event at the points in the grid code (say maybe RowSaved) where you want to notify the form that something has changed in the usercontrol/grid. Then in the event handler for this event on your form, you can do whatever you need. You can use the event arguments to pass information to/from the user control to the event listener.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon