SpreadJS Documentation
clear Method
The name of the property to be cleared; if no property name is specified, clears all properties.
Clears the specified property value based on the property name.
Syntax
var instance = new GcSpread.Sheets.Style(backColor,
                                        foreColor,
                                        hAlign,
                                        vAlign,
                                        font,
                                        themeFont,
                                        formatter,
                                        borderLeft,
                                        borderTop,
                                        borderRight,
                                        borderBottom,
                                        locked,
                                        textIndent,
                                        wordWrap,
                                        shrinkToFit,
                                        backgroundImage,
                                        cellType,
                                        backgroundImageLayout,
                                        tabStop,
                                        textDecoration,
                                        imeMode,
                                        name,
                                        parentName,
                                        watermark);
var value; // Type: any
value = instance.clear(propertyName);
function clear( 
   propertyName : string
) : any;

Parameters

propertyName
The name of the property to be cleared; if no property name is specified, clears all properties.
Example
This example uses clear method.
<input type="button" id="button1" value="button1"/>

var style = new GcSpread.Sheets.Style();
style.backColor = "lightgreen";
activeSheet.setStyle(1,1,style,GcSpread.Sheets.SheetArea.viewport);

$("#button1").click(function () {
style.clear();
activeSheet.isPaintSuspended(true);
activeSheet.isPaintSuspended(false);
    });
See Also

Reference

Style class

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.