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.

gridpad sample

Thread ID:

Created:

Updated:

Platform:

Replies:

15257 Jun 15,2004 10:57 AM Jun 15,2004 11:28 AM Windows Forms 1
loading
Tags: GridControl
Philip Bishop
Asked On June 15, 2004 10:57 AM

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 11:28 AM

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.

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.

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.

;