Customized class that enables more data to be retrieved from server transparently and virtually as users scroll the data forward.
            
Object Model
            
Syntax
| Visual Basic (Declaration) |   | 
|---|
Public Class CustomVirtualLoad   | 
 
| C# |   | 
|---|
public class CustomVirtualLoad   | 
 
| Delphi |   | 
|---|
public class CustomVirtualLoad   | 
 
| JScript |   | 
|---|
public class CustomVirtualLoad   | 
 
| Managed Extensions for C++ |   | 
|---|
public __gc class CustomVirtualLoad   | 
 
| C++/CLI |   | 
|---|
public ref class CustomVirtualLoad   | 
 
 
            
            
            
            
Example
 
             The following sample codes show you how to create grid in Custom VirtualPaging mode programmatically.
| C# |  Copy Code | 
|---|
private void WebGrid1_InitializeDataSource(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e)
{
  string sortExpression = "";
  // get all sort expression with GetSortExpression method
  if (WebGrid1.RootTable.SortedColumns.Count > 0) sortExpression = " order by " + WebGrid1.RootTable.SortedColumns.GetSortExpression();
  // select only required top x from your table. The RequestedRows is automatically determined by the control.
  OleDbDataAdapter da = new OleDbDataAdapter("select top " +    WebGrid1.VirtualLoadArgs.RequestedRows.ToString() + " * from [order details]" + sortExpression, oleDbConnection1);
  da.Fill(orderDetails1.Order_Details);
  oleDbConnection1.Open();
  OleDbCommand cmd = new OleDbCommand("select count(*) from [order details]", oleDbConnection1);
  // the grid need to know the original count of your table, in order for the control to know whether there are more data to fetch or not.
  WebGrid1.VirtualLoadArgs.TotalDataSourceRows = int.Parse( cmd.ExecuteScalar().ToString() );
  oleDbConnection1.Close();
   
  e.DataSource = orderDetails1;
} | 
 
 
            
            Remarks
            
Inheritance Hierarchy
System.Object
   ISNet.WebUI.WebGrid.CustomVirtualLoad
 
            
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
 
            
            
See Also