Spread ASP.NET 6.0 Product Documentation
AutoPostBack Property
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > IAutoPostBack Interface : AutoPostBack Property


Glossary Item Box

Gets or sets whether the component automatically posts back when clicked.

Syntax

Visual Basic (Declaration) 
Property AutoPostBack As Boolean
Visual Basic (Usage)Copy Code
Dim instance As IAutoPostBack
Dim value As Boolean
 
instance.AutoPostBack = value
 
value = instance.AutoPostBack
C# 
bool AutoPostBack {get; set;}

Property Value

Boolean: true for automatic postback; false otherwise

Remarks

This property determines whether the component automatically posts back data to the server based on interaction by the user.

Example

C#Copy Code
FarPoint.Web.Spread.ComboBoxCellType cb = new FarPoint.Web.Spread.ComboBoxCellType(new string[] {"One", "Two", "Three"});
cb.ShowButton = true;
FpSpread1.ActiveSheetView.Cells[0, 0].CellType = cb;
FpSpread1.EnableClientScript = false;

private void FpSpread1EditCommand(object sender, FarPoint.Web.Spread.SpreadCommandEventArgs e) 
{
    bool ap;
    FarPoint.Web.Spread.Editor.IEditor ed;
    ed = e.SheetView.Cells[e.CommandArgument, 0].Editor;
    if (fpEditor is FarPoint.Web.Spread.IAutoPostBack) 
    {
        ap = ((FarPoint.Web.Spread.IAutoPostBack) ed).AutoPostBack; 
        Response.Write(ap.ToString()); 
    }
}
Visual BasicCopy Code
Dim cb As New FarPoint.Web.Spread.ComboBoxCellType(New String() {"One", "Two", "Three"})
cb.ShowButton = True
FpSpread1.ActiveSheetView.Cells(0, 0).CellType = cb
FpSpread1.EnableClientScript = False

Private Sub FpSpread1EditCommand(ByVal sender As Object, ByVal e As FarPoint.Web.Spread.SpreadCommandEventArgs) Handles FpSpread1.EditCommand
    Dim ap As Boolean
    Dim ed As FarPoint.Web.Spread.Editor.IEditor
    ed = e.SheetView.Cells(e.CommandArgument, 0).Editor
    If TypeOf ed Is FarPoint.Web.Spread.IAutoPostBack Then
        ap = CType(ed, FarPoint.Web.Spread.IAutoPostBack).AutoPostBack
        Response.Write(ap.ToString())
    End If 
End Sub

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

© 2002-2012 GrapeCity, Inc. All Rights Reserved.