private void Page_Load(object sender, System.EventArgs e)
{
myCurrcurr = new myCurr();
FpSpread1.ActiveSheetView.Cells[0, 0].CellType = curr;
FpSpread1.ActiveSheetView.SetCellValue(0, 0, 99.95);
}
[Serializable()]
class myCombo : FarPoint.Web.Spread.ComboBoxCellType
{
public override string Format(object o)
{
return base.Format(o);
}
public override BaseValidatorGetValidator()
{
return base.GetValidator();
}
public override ControlPaintCell(string id, TableCell tc, FarPoint.Web.Spread.Appearance style, FarPoint.Web.Spread.Inset margin,object v,bool ul)
{
return base.PaintCell(id, tc, style, margin, v, ul);
}
public override object Parse(string s)
{
return base.Parse(s);
}
public override bool ValidateEditorValue(object val, out string reason)
{
return base.ValidateEditorValue(val, out reason);
}
}
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim curr As New myCurr()
FpSpread1.ActiveSheetView.Cells(0, 0).CellType = curr
FpSpread1.ActiveSheetView.SetCellValue(0, 0, 99.95)
End Sub
<Serializable()> _
Public Class myCurr
Inherits FarPoint.Web.Spread.CurrencyCellType
Public Overrides Function Format(ByVal o As Object) As String
Return MyBase.Format(o)
End Function
Public Overrides Function GetValidator() As BaseValidator
Return MyBase.GetValidator
End Function
Public Overrides Function PaintCell(ByVal id As String, ByVal tc As TableCell, ByVal style As FarPoint.Web.Spread.Appearance, ByVal margin As FarPoint.Web.Spread.Inset, ByVal v As Object,ByVal ul As Boolean) As System.Web.UI.Control
Return MyBase.PaintCell(id, tc, style, margin, v, ul)
End Function
Public Overrides Function Parse(ByVal s As String) As Object
Return MyBase.Parse(s)
End Function
Public Overrides Function ValidateEditorValue(ByVal val As Object, ByRef reason As String) As Boolean
Return MyBase.ValidateEditorValue(val, reason)
End Function
End Class