Intersoft WebGrid Documentation
How-to: Retrieve a different VirtualPageSize on a specific condition
See Also Send comments on this topic.

Glossary Item Box

Different VirtualPageSize in VirtualLoad can be retrieved in a specific condition. You can navigate to anywhere in grid paging. 

Navigate

To Implement different VirtualPageSize in WebGrid

  1. Set the PagingMode to VirtualLoad.
  2. Set the VirtualPageSize property to a value.
  3. In the JavaScript, use the following code:

    JavaScript Copy Code
    var timeout = 1000;
    function go_to()
    {                
        var rowIndex = document.getElementById("txtGoto").value;        
        move(rowIndex);
    }
    
    function move(rowIndex)
    {
        var grid = ISGetObject("WebGrid1");      
        if (grid.TotalLoadedRows < rowIndex) 
        {
            wgLoadMore('WebGrid1');
            setTimeout(function() {move(rowIndex);},timeout)        
        }
        else
        {                    
            grid.RootTable.GetRow(rowIndex-1).Select();            
        }       
    }
    

  4. Run the project. 

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.