Intersoft WebGrid Documentation
IsDataCached Method
See Also  Send Feedback
ISNet.WebUI.WebGrid Namespace > WebValueList Class : IsDataCached Method






Specifies whether the data source has already been cached.

Syntax

Visual Basic (Declaration) 
Public Function IsDataCached() As Boolean
Visual Basic (Usage)Copy Code
Dim instance As WebValueList
Dim value As Boolean
 
value = instance.IsDataCached()
C# 
public bool IsDataCached()
Delphi 
public function IsDataCached(): Boolean; 
JScript 
public function IsDataCached() : boolean;
Managed Extensions for C++ 
public: bool IsDataCached(); 
C++/CLI 
public:
bool IsDataCached(); 

Return Value

 

Requirements

Example

The example below shows how to use IsDataCached method in WebValueList. The vlProd utilizes that automated data caching feature which is also implemented by the WebValueList class.

 

protected void WebGrid1_InitLayout(object sender, ISNet.WebUI.WebGrid.LayoutEventArgs e)
{

    // set valuelist for ShipVia
    WebValueList vlShipVia = WebGrid1.GetTableByName("Orders").Columns.GetNamedItem("ShipVia").ValueList;
    Hashtable htShipVia = new Hashtable();
    htShipVia.Add("1", "Speedy Express");
    htShipVia.Add("2", "United Package");
    htShipVia.Add("3", "Federal Shipping");
    vlShipVia.DataSource = htShipVia;

   // set valuelist for Products
       WebValueList vlProd = WebGrid1.GetTableByName("Order Details").Columns.GetNamedItem("ProductID").ValueList;

   if (!vlProd.IsDataCached())
      {
        daProducts.Fill(dsNorthWind1.Products);
        vlProd.DataSource = dsNorthWind1;
      }
   
    vlProd.DataMember = "Products";
    vlProd.DataTextField = "ProductName";
    vlProd.DataValueField = "ProductID";

}

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

©2012 Intersoft Solutions Corp. All Rights Reserved.