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

gridpad sample

Thread ID:





15257 Jun 15,2004 02:57 PM UTC Jun 15,2004 03:28 PM UTC WinForms 1
Tags: GridControl
Philip Bishop
Asked On June 15, 2004 02:57 PM UTC

I was copying some code from your gridpad sample about how to put copy/paste in the menu. I had one question about why you did something and hoped you could answer it. Why do u do the following. Dim grid As GridControlBase = ActiveGrid If Not (grid Is Nothing) Then grid.Model.CutPaste.Copy() End If End Sub ''InvokeAction Why do u check the grid for is nothing? We never allow in our grids the user to not have a cell selected. So when a form comes up a cell is selected and if they click a button or something on the the form with the grid, the cell stays selected. So why do you check for is nothing? Is this just a standard practice to follow and if i dont could this cause a potential problem that i havent yet encountered? Phil

Administrator [Syncfusion]
Replied On June 15, 2004 03:28 PM UTC

I think this code is specific to the GridPad implementation of the ActiveGrid property. If you look at the definition of the property ActiveGrid, you will see that the getter has code to try to return a parent form''s active control, and if this control is not a GridControlBase, this method returns null. So, maybe one of the MDI child documents has controls other than grids on them, and this control is the the form''s active control. In this case, the ActiveGrid property would return null.


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