[Serializable()]
classmyCombo:FarPoint.Web.Spread.ComboBoxCellType
{
publicoverridestringFormat(objecto)
{
returnbase.Format(o);
}
publicoverrideBaseValidatorGetValidator()
{
returnbase.GetValidator();
}
publicoverrideControlPaintCell(stringid,TableCelltc,FarPoint.Web.Spread.Appearancestyle,FarPoint.Web.Spread.Insetmargin,objectv,boolul)
{
returnbase.PaintCell(id,tc,style,margin,v,ul);
}
publicoverrideobjectParse(strings)
{
returnbase.Parse(s);
}
publicoverrideboolValidateEditorValue(objectval,outstringreason)
{
returnbase.ValidateEditorValue(val,outreason);
}
}
privatevoidPage_Load(objectsender,System.EventArgse)
{
myCurrcurr=newmyCurr();
FpSpread1.ActiveSheetView.Cells[0,0].CellType=curr;
FpSpread1.ActiveSheetView.SetCellValue(0,0,99.95);
}
<Serializable()>
PublicClassmyCurr
InheritsFarPoint.Web.Spread.CurrencyCellType
PublicOverridesFunctionFormat(ByValoAsObject)AsString
ReturnMyBase.Format(o)
EndFunction
PublicOverridesFunctionGetValidator()AsBaseValidator
ReturnMyBase.GetValidator
EndFunction
PublicOverridesFunctionPaintCell(ByValidAsString,ByValtcAsTableCell,ByValstyleAsFarPoint.Web.Spread.Appearance,ByValmarginAsFarPoint.Web.Spread.Inset,ByValvAsObject,ByValulAsBoolean)AsSystem.Web.UI.Control
ReturnMyBase.PaintCell(id,tc,style,margin,v,ul)
EndFunction
PublicOverridesFunctionParse(ByValsAsString)AsObject
ReturnMyBase.Parse(s)
EndFunction
PublicOverridesFunctionValidateEditorValue(ByValvalAsObject,ByRefreasonAsString)AsBoolean
ReturnMyBase.ValidateEditorValue(val,reason)
EndFunction
EndClass
PrivateSubPage_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load
DimcurrAsNewmyCurr()
FpSpread1.ActiveSheetView.Cells(0,0).CellType=curr
FpSpread1.ActiveSheetView.SetCellValue(0,0,99.95)
EndSub