Table of Contents

Class JsonDataTable

Namespace
Tripous.Data
Assembly
Tripous.Data.dll

JSON contract for a data table used by Tripous Web.

public class JsonDataTable
Inheritance
JsonDataTable
Inherited Members
Extension Methods

Constructors

JsonDataTable()

Constructor.

public JsonDataTable()

JsonDataTable(DataTable)

Constructor.

public JsonDataTable(DataTable Source)

Parameters

Source DataTable

JsonDataTable(DataTable, TableDef)

Constructor.

public JsonDataTable(DataTable Source, TableDef TableDef)

Parameters

Source DataTable
TableDef TableDef

Properties

AutoGenerateGuidKeys

True when key values should be generated as Guid strings.

public bool AutoGenerateGuidKeys { get; set; }

Property Value

bool

Columns

The columns.

public List<JsonDataColumn> Columns { get; set; }

Property Value

List<JsonDataColumn>

Deleted

The deleted rows.

public List<JsonDataRow> Deleted { get; set; }

Property Value

List<JsonDataRow>

DetailField

The detail field name.

public string DetailField { get; set; }

Property Value

string

Details

The detail table names.

public List<string> Details { get; set; }

Property Value

List<string>

KeyField

The key field name.

public string KeyField { get; set; }

Property Value

string

Locators

The table-specific locator definitions.

public JsonLocatorList Locators { get; set; }

Property Value

JsonLocatorList

MasterField

The master field name.

public string MasterField { get; set; }

Property Value

string

MasterTableName

The master table name.

public string MasterTableName { get; set; }

Property Value

string

Name

The table name.

public string Name { get; set; }

Property Value

string

Rows

The rows.

public List<JsonDataRow> Rows { get; set; }

Property Value

List<JsonDataRow>

Methods

RowsTo(DataTable)

Copies rows to a data table, preserving row state.

public void RowsTo(DataTable Table)

Parameters

Table DataTable

ToJObject()

Converts this instance to a JSON object.

public JsonObject ToJObject()

Returns

JsonObject

ToJObject(DataTable, TableDef)

Converts a data table to a JSON object.

public static JsonObject ToJObject(DataTable Source, TableDef TableDef = null)

Parameters

Source DataTable
TableDef TableDef

Returns

JsonObject

ToJson()

Converts this instance to JSON text.

public string ToJson()

Returns

string