Intersoft WebGrid Documentation
RefreshData Field
See Also  Send Feedback
ISNet.WebUI.WebGrid Namespace > PostBackAction Class : RefreshData Field






Indicates refreshing the grid and its data is being executed in FlyPostBack mode.

Syntax

Visual Basic (Declaration) 
Public Const RefreshData As String
Visual Basic (Usage)Copy Code
Dim value As String
 
value = PostBackAction.RefreshData
C# 
public const string RefreshData
Delphi 
public field RefreshData: String; Const 
JScript 
public constvar RefreshData : String;
Managed Extensions for C++ 
public: const string* RefreshData
C++/CLI 
public:
const String^ RefreshData

Example

The example below shows you how to utilize the collect input function for direct value retrieval in server side:

 

[C#]

private void WebGrid1_InitializeDataSource(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e)
{
     if (WebGrid1.FlyPostBackAction == PostBackAction.RefreshData)
     {
       // only fill data when flypostbackaction is refreshdata

      // note that we can now directly retrieving TextBox1.Text and DropDownList1.SelectedValue
 

     oleDbDataAdapter1.SelectCommand.CommandText = "select * from customers where contactnamelike '"   + TextBox1.Text + "%'" + (DropDownList1.SelectedValue != "(all)" ? " and country = '" + DropDownList1.SelectedValue  + "'" : "");
     oleDbDataAdapter1.Fill(dsNorthWindEnt1.Customers);
     }
     e.DataSource = dsNorthWindEnt1;
}

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.