corelibraries-devexpress-dot-dataaccess-dot-node-1.md
A base class that defines a node in a tree-like structure of objects.
Namespace : DevExpress.DataAccess
Assembly : DevExpress.DataAccess.v25.2.dll
NuGet Package : DevExpress.DataAccess
public class Node<T>
Public Class Node(Of T)
| Name | Description |
|---|---|
| T |
The node value type.
|
The following members return Node<T> objects:
The following Node<T> members define a node as part of a tree hierarchy:
Declare a class that inherits Node<T> to implement an element of a tree structure:
using DevExpress.DataAccess;
using DevExpress.DataAccess.Json;
// ...
// Create a new JSON source.
var jsonSource = new UriJsonSource() {
Uri = new Uri(@"https://localhost:44367/api/values")
};
// Create the "X-Date" and "X-Id" header parameters that are added to the JSON URI requests.
jsonSource.HeaderParameters.AddRange(new[] {
new HeaderParameter("X-Date", typeof(String), String.Format("{0:yyyy-MM-dd}", DateTime.Today)),
// "ID" is a report parameter whose value is used for the "X-Id" header parameter.
new HeaderParameter("X-Id", typeof(Expression), new Expression("?ID"))
});
// Assign the JSON source to the data source.
var datasource = new JsonDataSource() {
JsonSource = jsonSource
};
Imports DevExpress.DataAccess
Imports DevExpress.DataAccess.Json
' ...
' Create a new JSON source.
Dim jsonSource = New UriJsonSource() With {.Uri = New Uri("https://localhost:44367/api/values")}
' Create the "X-Date" and "X-Id" header parameters that are added to the JSON URI requests.
jsonSource.HeaderParameters.AddRange( {
New HeaderParameter("X-Date", GetType(String), String.Format("{0:yyyy-MM-dd}", Date.Today)),
New HeaderParameter("X-Id", GetType(Expression), New Expression("?ID"))
})
' "ID" is a report parameter whose value is used for the "X-Id" header parameter.
' Assign the JSON source to the data source.
Dim datasource = New JsonDataSource() With {.JsonSource = jsonSource}
The JsonSchemaNode class is based on Node<JsonNode> and defines nodes of the JsonDataSource‘s Schema. JsonNode contains properties that define the data source field that is created from the node of the JSON schema.
Object Node<T> JsonSchemaNode
See Also