SpreadJS Documentation
setValue Method
The row index.
The value to set.
Sets the value of the source by the binding path.
Syntax
var instance = new GcSpread.Sheets.CellBindingSource(source);
var returnValue; // Type: any
returnValue = instance.setValue(path, value);
function setValue( 
   path : string,
   value : Object
) : any;

Parameters

path
The row index.
value
The value to set.
Example
This example sets the name value.
var person = {name: "Wang feng", age: 25, address: {postcode: "710075"}};
var source = new GcSpread.Sheets.CellBindingSource(person);
activeSheet.setBindingPath(0, 0, "name");
activeSheet.setBindingPath(1, 1, "age");
activeSheet.setBindingPath(3, 3, "address.postcode");
activeSheet.setDataSource(source);
source.setValue("name", "test");
activeSheet.isPaintSuspended(false);
activeSheet.repaint();
See Also

Reference

CellBindingSource class

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.