Getting started with Objective Grid for .NET
This section describes how to build the Objective Grid for .NET control and the .NET assemblies that it depends on.
Prerequisites
To build the Objective Grid for .NET control you need to have Visual Studio installed on your system. This version supports Visual Studio 2012 (11.0), Visual Studio 2013 (12.0), and Visual Studio 2015 (14.0).
You also need to have the Object Grid libraries compiled, since the Objective Grid for .NET control is a wrapper class on top of the underlying MFC control. The wrapper needs Objective Grid DLLs built with the asu or asud build configurations in 32 or 64 bits (x86 or x64).
Building the assemblies
The Objective Grid for .NET directory, which is located in the Stingray installation directory, contains the solution files (GridControl<VSVersion>.sln, where <VSVersion> stands for the major version of the target Visual Studio ― 11 for VS2012, 12 for VS2013, and 14 for VS2015) that must be built in order to create the assemblies for Objective Grid for .NET.
These solution files build five different projects:
*GridUtils: contains utility types that are used in several places.
*GridControl: the .NET version of the Grid control that can be inserted in a Windows Form application.
*GridHostNet: provides the functionality of integrating a .NET control into a Grid cell.
*GridTabControl: a set of controls that can aggregate several Grid controls like in a Microsoft Excel® workbook.
*GridExcelHelper: a set of classes that simplify the use of Microsoft Excel® data files.
All these projects can be built in Release or Debug modes (see the Visual Studio Solution Configuration field), and for Win32 (x86) or x64 architecture (see the Visual Studio Solution Platforms field). When building the .NET assemblies, the referenced Objective Grid native libraries must be in Lib\vc<VSVersion>\<platform>.
After building the DLLs, you will find them in the following locations:
*Stingray.GridExcelHelper.dll: can be found in <stingray-installdir>\Assemblies\<configuration>\vc<VSVersion>\<platform>.
*All others: can be found in <stingray-installdir>\Objective Grid for .NET\Assemblies\<configuration>\vc<VSVersion>\<platform>.
Running the examples
Some examples of how the Objective Grid for .NET control can be used are delivered with the product, under the Objective Grid for .NET directory:
*Samples: small applications written in C# that demonstrate different features of the Grid control within a pure Windows Forms context. To browse and build all the sample projects, load the solution file Samples\Samples<VSVersion>.sln in Visual Studio.
*Tutorials: step-by-step lessons, usually based on C#, that demonstrate how to augment your application to add specific functionalities. To browse and build all the tutorial projects, load the solution file Tutorials\Tutorials<VSVersion>.sln in Visual Studio.
To build all or some of the provided applications, make sure that your configuration (Debug or Release) and platform (Win32 or Win64) match the settings that were used to build the Objective Grid for .NET assemblies.
Deploying your application
When the application is ready for distribution, you must make sure that its deployment is performed along with the dependent assemblies.
The easiest way to make sure that the application can find the Stingray assemblies is to copy them in the same directory as the executable. You can also register those assemblies in the Global Assembly Cache, with the .NET command: gacutil -i <assemblyName>.
Because the .NET assemblies depend on the native Objective Grid DLLs, you may also want to copy them (that is, og<*>.dll, sfl<*>.dll and RWUXTheme<*>.dll where <*> depends on your target compiler and configuration) next to the other ones.
Finally, those Stingray assemblies depend on DLLs that are part of the compiler you have used. You may have to download (or copy from Program Files [(x86)]\Microsoft Visual Studio <Version>\VC\redist\<Locale> on the development machine) and install, on the target machine, the Visual C++ Redistributable package from the Microsoft web site, for the appropriate compiler and architecture.
For help solving any runtime error regarding load failures , please read How the Runtime Locates Assemblies from Microsoft.