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.
constr As String
dt As New
sql As String
Data Source=c:\XYDataGridTestData.mdb;User Id=admin;Password=;"
cn As New
"Select * from XYDataGridTestTable"
cmd As New
da As New
XYDataGrid1.DataSource = dt
Another important code
snippet is the code which should be added to design side.
<form id="form1" runat="server">
<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">
After you set the
properties as below the datagrid can be ready to work.
Figure 2: Some Pictures from The
Figure 3: Ready to scroll
down and right.
Figure 4: After first
scroll right, department column is sliding to left. Two columns which are ID and
Name are fixed.
Figure 5: After birthday
column is sliding to left.
Figure 6: After scroll
down, the first row is scroll up.
Figure 7: After scroll
down, the first rows are scroll up.