Show / Hide Table of Contents

    DataTableExtensions Class

    .NET Standard 2.x

    For DataTable, import or export data in xml / json format.

    Namespace: SnapObjects.Data

    Assembly: SnapObjects.Data.dll

    Syntax

    public static class DataTableExtensions;
    

    Extensions Methods

    Name Returns Type Description
    AddDataTable([NotNull]this IDataPacker packer,[NotNull]string key,[NotNull]DataTable value) void Add a DataTable object as an element to the IDataPacker object.
    AddDataTable([NotNull]this IDataPacker packer,[NotNull]string key,[NotNull]DataTable value,[NotNull]bool changedOnly) void Add a DataTable object as an element to the IDataPacker object, and specifies whether to export only the changed data from the DataTable object.
    GetDataTable([NotNull]this IDataPacker dataPacker,[NotNull]string key) DataTable Gets the DataTable object created by the specified element.
    GetDataTable([NotNull]this IDataUnpacker dataUnPackage,[NotNull]string key) DataTable Gets the DataTable object created by the specified element.
    ExportJson(this DataTable dataTable) string Exports data from the DataTable to a Plain JSON string.
    ExportJson(this DataTable dataTable, bool changedOnly) string Exports all rows or only the changed rows from the DataTable to a Plain JSON string.
    ExportJson(this DataTable dataTable, int startRow) string Exports data from the DataTable to a Plain JSON string, and specifies the starting position of the rows.
    ExportJson(this DataTable dataTable, int startRow, int endRow) string Exports data from the DataTable to a Plain JSON string, and specifies the start and end positions of the rows.
    ExportJson(this DataTable dataTable, int startRow, int endRow, short startColumn) string Exports data from the DataTable to a Plain JSON string, and specifies the start and end positions of the rows and starting position of the column.
    ExportJson(this DataTable dataTable, int startRow, int endRow, short startColumn, short endColumn) string Exports data from the DataTable to a Plain JSON string, and specifies the start and end positions of the rows and columns.
    ExportXml(this DataTable dataTable) string Exports data from the DataTable to a Plain Xml string.
    ExportXml(this DataTable dataTable, bool changedOnly) string Exports all rows or only the changed rows from the DataTable to a Plain Xml string.
    ExportXml(this DataTable dataTable, int startRow) string Exports data from the DataTable to a Plain Xml string, and specifies the starting position of the rows.
    ExportXml(this DataTable dataTable, int startRow, int endRow) string Exports data from the DataTable to a Plain Xml string, and specifies the start and end positions of the rows.
    ExportXml(this DataTable dataTable, int startRow, int endRow, short startColumn) string Exports data from the DataTable to a Plain Xml string, and specifies the start and end positions of the rows and starting position of the column.
    ExportXml(this DataTable dataTable, int startRow, int endRow, short startColumn, short endColumn) string Exports data from the DataTable to a Plain Xml string, and specifies the start and end positions of the rows and columns.
    ImportJson(this DataTable dataTable, string json) int Import data from a JSON string into the DataTable.
    ImportJson(this DataTable dataTable, string json, int startRow) int Import data from a JSON string into the DataTable, and specifies the starting position of the rows.
    ImportJson(this DataTable dataTable, string json, int startRow, int endRow) int Import data from a JSON string into the DataTable, and specifies the start and end positions of the rows.
    ImportJson(this DataTable dataTable, string json, int startRow, int endRow, short startProperty) int Import data from a JSON string into the DataTable, and specifies the start and end positions of the rows and starting position of the property.
    ImportJson(this DataTable dataTable, string json, int startRow, int endRow, short startProperty, short endProperty) int Import data from a JSON string into the DataTable, and specifies the start and end positions of the rows and properties.
    ImportJsonByKey(this DataTable dataTable, string json) int Import data from the JSON string into the DataTable based on the key name.
    ImportJsonByKey(this DataTable dataTable, string json, int startRow) int Import data from the JSON string into the DataTable based on the key name, and specifies the starting position of the rows.
    ImportJsonByKey(this DataTable dataTable, string json, int startRow, int endRow) int Import data from the JSON string into the DataTable based on the key name, and specifies the start and end positions of the rows.
    ImportXml(this DataTable dataTable, string xml) int Import data from a XML string into the DataTable.
    ImportXml(this DataTable dataTable, string xml, int startRow) int Import data from a XML string into the DataTable, and specifies the starting position of the rows.
    ImportXml(this DataTable dataTable, string xml, int startRow, int endRow) int Import data from a XML string into the DataTable, and specifies the start and end positions of the rows.
    ImportXml(this DataTable dataTable, string xml, int startRow, int endRow, short startProperty) int Import data from a XML string into the DataTable, and specifies the start and end positions of the rows and starting position of the property.
    ImportXml(this DataTable dataTable, string xml, int startRow, int endRow, short startProperty, short endProperty) int Import data from a XML string into the DataTable, and specifies the start and end positions of the rows and properties.
    ImportXmlByKey(this DataTable dataTable, string xml) int Import data from the XML string into the DataTable based on the key name.
    ImportXmlByKey(this DataTable dataTable, string xml, int startRow) int Import data from the XML string into the DataTable based on the key name, and specifies the starting position of the rows.
    ImportXmlByKey(this DataTable dataTable, string xml, int startRow, int endRow) int Import data from the XML string into the DataTable based on the key name, and specifies the start and end positions of the rows.

    Remarks

    Back to top Generated by Appeon