FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > FpSpread Class : Validate Method |
Overload | Description |
---|---|
Validate | Tests to see if the value is valid for a cell in the active sheet in the Spread component. |
This method calls the ValidateEditorValue method.
PrivatevoidPage_Load(objectsender,System.EventArgse) { If(this.IsPostBack)Return; FpSpread1.ActiveSheetView.Columns[0].CellType=NewFarPoint.Web.Spread.CurrencyCellType(); FpSpread1.ActiveSheetView.SetValue(0,0,108.89); } PrivatevoidButton1_Click(objectsender,System.EventArgse) { objectval=FpSpread1.ActiveSheetView.Cells[0,0].Value; stringreason; reason=FpSpread1.Validate(val,0,0); If(reason==null||reason==String.Empty){ TextBox1.Text="Valid"; }Else{ TextBox1.Text=reason; } }
PrivateSubPage_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load If(Me.IsPostBack)ThenReturn FpSpread1.ActiveSheetView.Columns(0).CellType=NewFarPoint.Web.Spread.CurrencyCellType() FpSpread1.ActiveSheetView.SetValue(0,0,108.89) EndSub PrivateSubButton1_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesButton1.Click DimvalAsObject=FpSpread1.ActiveSheetView.Cells[0,0].Value DimreasonAsString reason=FpSpread1.Validate(val,0,0) If(reason=NothingOrreason=String.Empty)Then TextBox1.Text="Valid" Else TextBox1.Text=reason EndIf EndSub
Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional