Provides a way to get the last selected object from client side.
Syntax
| Visual Basic (Declaration) | |
|---|
Public Function RetrieveClientLastSelectedObject() As SelectedObject |
| Visual Basic (Usage) | Copy Code |
|---|
Dim instance As WebGrid
Dim value As SelectedObject
value = instance.RetrieveClientLastSelectedObject() |
| Delphi | |
|---|
public function RetrieveClientLastSelectedObject(): SelectedObject; |
| JScript | |
|---|
public function RetrieveClientLastSelectedObject() : SelectedObject; |
| Managed Extensions for C++ | |
|---|
public: SelectedObject* RetrieveClientLastSelectedObject(); |
Example
The following sample shows you how to use the RetrieveClientLastSelectedObject to get the last selected customer ID value.
| C# | Copy Code |
|---|
private void WebGrid1_InitializeDataSource(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e)
{
DataSet ds = new DataSet();
oleDbDataAdapter1.Fill(ds);
e.DataSource = ds;
}
private void WebGrid1_PrepareDataBinding(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e)
{
if(!IsPostBack)
WebGrid1.RetrieveStructure();
WebGrid1.RootTable.DataKeyField = "CustomerID";
}
private void Button1_Click(object sender, System.EventArgs e)
{
//Label1.Text = WebGrid1.RetrieveClientLastSelectedObject().KeyValue;
SelectedObject selObj = WebGrid1.RetrieveClientLastSelectedObject();
Label1.Text = selObj.KeyValue;
} |
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