Spread ASP.NET 6.0 Product Documentation
PaintCell Method
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > ButtonCellType Class : PaintCell Method


Glossary Item Box

Gets a control and renders it in the cell based on the specified appearance, margin, and value.

Overload List

OverloadDescription
PaintCell(String,TableCell,Appearance,Inset,Object,Boolean)Gets a control and renders it in the cell based on the specified appearance, margin, and value.  
PaintCell(PdfGraphics,RectangleF,Appearance,Object,Boolean,Boolean,Single)Gets a control and prints the cell to PDF based on the specified appearance and selection.  

Example

This example subclasses the ButtonCellType and creates a button cell in the first cell of the spreadsheet.
C#Copy Code
[Serializable()]
classbtnType:FarPoint.Web.Spread.ButtonCellType
{
PublicoverrideControlGetEditorControl(stringid,TableCellparent,FarPoint.Web.Spread.Appearancestyle,FarPoint.Web.Spread.Insetmargin,objectv,boolul)
{
ReturnBase.GetEditorControl(id,parent,style,margin,v,ul);
}

PublicoverrideControlPaintCell(stringid,TableCellparent,FarPoint.Web.Spread.Appearancestyle,FarPoint.Web.Spread.Insetmargin,objectv,boolul)
{
ReturnBase.PaintCell(id,parent,style,margin,v,ul);
}
}

PrivatevoidPage_Load(objectsender,System.EventArgse)
{
btnTypemybtn=NewbtnType();
FpSpread1.ActiveSheetView.Cells[0,0].CellType=mybtn;
}
Visual BasicCopy Code
<Serializable()>
PublicClassbtnType
InheritsFarPoint.Web.Spread.ButtonCellType

PublicOverridesFunctionGetEditorControl(ByValidAsString,ByValparentAsTableCell,ByValstyleAsFarPoint.Web.Spread.Appearance,ByValmarginAsFarPoint.Web.Spread.Inset,ByValvalAsObject,ByValulAsBoolean)AsSystem.Web.UI.Control
ReturnMyBase.GetEditorControl(id,parent,style,margin,val,ul)
EndFunction

PublicOverridesFunctionPaintCell(ByValidAsString,ByValparentAsTableCell,ByValstyleAsFarPoint.Web.Spread.Appearance,ByValmarginAsFarPoint.Web.Spread.Inset,ByValvalAsObject,ByValulAsBoolean)AsSystem.Web.UI.Control
ReturnMyBase.PaintCell(id,parent,style,margin,val,ul)
EndFunction

EndClass

PrivateSubPage_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load
DimmybtnAsNewbtnType()
FpSpread1.ActiveSheetView.Cells(0,0).CellType=mybtn
EndSub

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.