Installation and use
Requirements
AxpDataGrid requires .NET FrameWork 1.1 or 2.0.
Please note that there are separate versions for .NET 1.1 and 2.0.
The webcontrol assembly file, AxpDBNet.DLL is located in the subdirectory NET11 and NET20 of the zipped distribution file.
Enable AxpDataGrid in your ASP.NET application
-
Copy the AxpDBNet.dll file to the bin directory of your application. (Visual Studio does this automatically. See next section.)
-
Make sure to add a reference to AxpDBNet.dll in your project. (Visual Studio does this automatically. See next section.)
-
For licensed versions, copy the Axezz.WebControls.AxpDataGrid.lic file to the bin directory of the application.
(If you do not have a bin folder below the root of your application, create the folder manually.)
Visual Studio 2003/2005 integration
-
Open Visual Studio.NET and select the Tools->Add/Remove Toolbox Items...
Alternatively right click the tool-box to active the pop-up menu to Add Toolbox Items.
Click the Browse... button, navigate to the location where you unzipped the AxpDBNetDistribute.zip and select NET11\AxpDBNet.dll
for .NET Framework version 1.1, or NET20\AxpDBNet.dll for .NET 2.0 version).
You can now drag and drop AxpDataGrid from the Toolbox in Visual Studio onto your
page, just like any other WebControl.
-
Visual Studio Help Collection Integration
- The Axezz help collection contains documentation for the AxpDataGrid and AlbumOnNet WebControls.
- It will enable dynamic help in Visual Studio, and has a table of content that will appear inside your Visual Studio MSDN Help Collection.
- Open the Doc\VisualStudioHelpCollection folder
- Run Register.bat
- Start Visual Studio Help or the Visual Studio IDE
- Wait for the Help system to reindex its collection
- The Axezz help system should now be available in the Table of Content and as integrated Dynamic Help in Visual Studio.
Other documentation
Microsoft ASP.NET Web Matrix (from www.asp.net) integration
-
Always create a proper web application when using AxpDataGrid (E.g. using Internet Service Manager)
See also this article.
-
Place the AxpDBNet.dll in the bin directory of your application. (Create the directory manually if it does not exist)
Get the Visual Studio Sample project up and running
-
Locate the zipped sample corresponding to your environment:
Visual Studio 7.1 (2003), asp.net 1.1, VB Solution : AxpDbNetVBSample.zip
Visual Studio 7.1 (2003), asp.net 1.1, C# Solution : AxpDbNetCSSample.zip
Visual Studio 8 (2005), asp.net 2.0, VB Solution : AxpDbNetVB2005Sample.zip
Visual Studio 8 (2005), asp.net 2.0, C# Solution : AxpDbNetCS2005Sample.zip
-
Unzip the content to your localhost web root directory.
-
Create a virtual directory for the project root using Internet Service Manager and give it
the same name as the project directory (e.g. AxpDBNetVBSample).
-
Point your browser to the newly created virtual directory (e.g. http://localhost/AxpDbNetVBSample)
-
The index page of the sample application should now be visible.
-
Follow the instruction on the index page.
The Sample project is configured to run against the Northwind Access Database and
you will need to have a copy of that db file or a standard installation of MS SQL Server
to run the samples. Download here if needed : http://office.microsoft.com/downloads/2000/Nwind2K.aspx
The connection string is set in the web.config file and can be changed to
a MS SQL Server connection if needed.
How to enable the Skins (Navigation buttons and Stylesheets)
AxpDataGrid is delivered with a set of graphical images and stylesheets (CSS files).
These files are found in the Sample applications and in the Skins folder.
Copy the the stylesheets and graphic files to your application or to a globally available URL.
Where are the stylesheets and graphical buttons?
The skin files are placed in the Skins folder and also in the Sample applications
The graphical buttons can be found in the folder "gfx".
The stylesheets can be found in the folder "css".
Samples 4 and 5 shows how to change the skin. (Sample 5 also has a skin browser)
Graphical elements (Buttons)
The location of the button directory (gfx) to use on your site is set with the property
ImageDir.
The default value is "../gfx/" and will work fine if the gfx folder and the folder structure of your application is structured
as directories with a single node root and all the aspx files one directory level below the root.
Otherwise you must set the ImageDir property to a specific URL on all AxpDataGrid instances.
To set the style sheet, you must set a standard html style link in the html head part of the page.
E.g.: <head> .... <LINK href="http://localhost/yourpath/css/AxpStyleWindowsGrid.css" rel=stylesheet> .... </head>
Notes.
Some of the style sheets use relative sizing notation (em). This can be changed to absolute sizing (px or pt),
but you will need to modify the size itself.
The Sample application pages have two style sheets to make sure that the relative sizing will work and
too set general page style.
See the aspx source for more details about this.
Kickstart on AxpDataGrid usage
Example 1 : Simple database query
In these examples the aspx page is placed in the application root and the skin files are placed in sub directories directly below the root.
No code behind is used in this example.
<%@ Page Language="vb" AutoEventWireup="false"%>
<%@ Register TagPrefix="axp" Namespace="Axezz.WebControls" Assembly="AxpDBNet" %>
<html>
<head>
<link href="css/AxpStyleWindowsGrid.css" rel="stylesheet" >
</head>
<body>
<form id="Form1" method="post" runat="server">
<axp:axpdatagrid Runat="Server" ID="AxpDataGrid1"
ConnectionString="Provider=sqloledb;Data source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI"
SQL="Select * From Products"
DisplayNavBar="both"
ImageDir="gfx/"></axp:axpdatagrid>
</form>
</body>
</html>
Example 2 : Enable data editing, Row rollover effect and Row click action
<axp:axpdatagrid Runat="Server" ID="AxpDataGrid1"
ConnectionString="Provider=sqloledb;Data source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI"
RowClickAction="openform"
RowRollOverEffect="True"
EditNewPKStatement="autoincrement"
DisplayNavBar="both"
EditPrimaryKeys="ProductId"
EditOptions="ALL"
SQL="Select * From Products"
DeleteSQL="Delete From Products"
ImageDir="gfx/"></axp:axpdatagrid>
Please make sure to get the Sample application up and running and inspect the code for more elaborate examples!
|