On the internet about Farpoint articles are not many, their own development of useful to, write to summarize.
FarPoint.Web.Spread can control the celltype you need in the cell. But sometimes we face a variety of needs, perhaps its own celltype does not meet our needs, then we can choose to customize the Celltype.
An example of a custom htmlinputbuttoncelltype:
<serializable () > Public Class pinbuttoncelltype Inherits FarPoint.Web.Spread.BaseCellType public Value as Stri Ng public OnClick As String public Overrides Function Paintcell (ByVal ID As String, ByVal parent as TableCell, ByVal Style as FarPoint.Web.Spread.Appearance, ByVal margin as FarPoint.Web.Spread.Inset, ByVal Val as Object, ByVal ul as Bool EAN) as System.Web.UI.Control "Manual realize JS function on client Fpcelltype value + _getvalue (RD) _seteditorvalue (Ed, V AL) _geteditorvalue (ed) _setvalue (Rd,val) Parent. Attributes.Add ("Fpcelltype", "pinbuttoncelltype") Dim lit as New System.Web.UI.HtmlControls.HtmlInputButton Lit. Value = value lit. Attributes.Add ("onclick", String.Format (onclick, Val)) Return lit End function public Overrides function Gete Ditorcontrol (ByVal ID as String, ByVal TC as TableCell, ByVal style as FarPoint.Web.Spread.Appearance, ByVal margin as far Point.Web.Spread.Inset, ByVal v as Object, ByVal ul as Boolean) as System.Web.UI.Control Return nothing End Func tion public Overrides Function Geteditorvalue (ByVal owner as Control, ByVal ID as String) as Object Return Mybas E.geteditorvalue (owner, id) End Function public Overrides function format (ByVal o as Object) as String Format = Mybase.format (o) End Function public Overrides function parse (ByVal s as String) as Object parse = MyBase. Parse (s) End function Public Function getvaluefromtext (ByVal s as String) as Object GetvaLuefromtext = s End functionend Class
Examples of Use:
' button name ' onclick functionfpsDemo.ActiveSheetView.Columns (0). Celltype = Btncelltype
Using Farpoint Web Spread custom Celltype in. Net