SpreadJS Documentation
getSource Method
Gets the wrapped data source for cell binding.
Syntax
var instance = new GcSpread.Sheets.CellBindingSource(source);
var value; // Type: Object
value = instance.getSource();
function getSource() : Object;

Return Value

The original data source.
Example
This example gets the name.
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);
alert(source.getSource().name);
See Also

Reference

CellBindingSource class

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.