Intersoft WebGrid Documentation
RebindDataSource Method
See Also  Example Send Feedback
ISNet.WebUI.WebGrid Namespace > WebGrid Class : RebindDataSource Method






Forces WebGrid to perform data source initialization and rebind the data source. This method will invoke InitializeDataSource event again for the rebind purpose.

Syntax

Visual Basic (Declaration) 
Public Sub RebindDataSource() 
Visual Basic (Usage)Copy Code
Dim instance As WebGrid
 
instance.RebindDataSource()
C# 
public void RebindDataSource()
Delphi 
public procedure RebindDataSource(); 
JScript 
public function RebindDataSource();
Managed Extensions for C++ 
public: void RebindDataSource(); 
C++/CLI 
public:
void RebindDataSource(); 

Example

 
C#Copy Code
private void Button1_Click(object sender, System.EventArgs e)
{
        WebGrid1.ClearCachedDataSource();
        WebGrid1.RebindDataSource();
}

Remarks

In this method, WebGrid will automatically reinvoke InitializeDataSource event, so the concept of centralized DataSource initialization still persist. However, before this event is invoked, ClearCachedDataSource must invoked first, otherwise RebindDataSource will only invoke PrepareDataBinding event because there is a cache maintained inside the WebGrid. Please look at the sample code above.

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.