ARTICLE

XYDataGrid

Posted by Yildirim Kocdag Articles | ASP.NET using VB.NET May 22, 2007
XYDataGrid is a web datagrid control which helps to developers to put fixed headers and fixed columns.
Download Files:
 
Reader Level:


Datagrid1.jpg

Figure 1.

XYDataGrid is a web datagrid control which helps to developers to put fix headers and fix columns.

One of the important business need is fixed headers and fixed columns for a datagrid component. However, it is not so easy for a web development team to add these functionalities to current datagrid control.

XYDatagrid offers you these methods to add and remove fixed columns and headers easily.

Using the code

Please add the below code after you add XYDataGrid as a reference to your project.

Dim constr As String

Dim dt As New System.Data.DataTable

Dim sql As String

constr = "Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=c:\XYDataGridTestData.mdb;User Id=admin;Password=;"

Dim cn As New OleDbConnection(constr)

cn.Open()

sql = "Select * from XYDataGridTestTable"

Dim cmd As New OleDbCommand(sql, cn)

Dim da As New OleDbDataAdapter(cmd)

da.Fill(dt)

XYDataGrid1.DataSource = dt

XYDataGrid1.DataBind()

 

Another important code snippet is the code which should be added to design side.

<form id="form1" runat="server">

    <div>

    <DIV style="Z-INDEX: 101; LEFT: 0px; OVERFLOW: auto; WIDTH: 400px;
POSITION: relative; TOP: 46px; HEIGHT: 200px">

        <cc1:XYDataGrid ID="XYDataGrid1" runat="server" style="border-width:
1px;border-style:None;"
FixHeader="True" FixColumn="2">

                </cc1:XYDataGrid>&nbsp;

    </DIV>

    </div>

</form> 

 

After you set the properties as below the datagrid can be ready to work.
 

datagrid6.jpg

 

Figure 2.
 

Some Pictures from The XYDataGrid,

 

Datagrid2.jpg

 

Figure 3:Ready to scroll down and right.

 

Datagrid4.jpg
 

Figure 4: After first scroll right, department column is sliding to left. Two columns which are ID and Name are fixed.


Datagrid2.jpg

 

Figure 5:After birthday column is sliding to left.


Datagrid5.jpg

 

Figure 6: After scroll down, the first row is scroll up.



Datagrid4.jpg
 

Figure 7: After scroll down, the first rows are scroll up.

Login to add your contents and source code to this article
share this article :
post comment
 
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
    Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites - Click Here!
Nevron Diagram
Become a Sponsor