Skip to main content

serialize()

serializes the component data into JSON, XML or CSV format

serialize(driver?: DataDriver): T[];

Parameters:

driver: string - optional, the format that the data will be serialized into ("json", "csv", "xml"), "json" by default

Returns:

Serialized data of the component either as an array of JSON objects or as a CSV/XML string.

Example

// serialize data into an array of JSON objects
treegrid.data.serialize();

// serialize data into an XML string
treegrid.data.serialize("xml");

// serialize data into a CSV string
treegrid.data.serialize("csv");