Class DataSourceSettingsBuilder
Inheritance
System.Object
DataSourceSettingsBuilder
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Syncfusion.JavaScript.DataVisualization
Assembly: Syncfusion.EJ.dll
Syntax
public class DataSourceSettingsBuilder
Constructors
DataSourceSettingsBuilder(DiagramProperties)
Declaration
public DataSourceSettingsBuilder(DiagramProperties model)
Parameters
| Type | Name | Description |
|---|---|---|
| DiagramProperties | model |
Fields
diagramModel
Declaration
public DiagramProperties diagramModel
Field Value
| Type | Description |
|---|---|
| DiagramProperties |
Methods
DataSource(Action<DataSourceBuilder>)
Gets or sets the data source either as a collection of objects or as an instance of ej.DataManager
Declaration
public DataSourceSettingsBuilder DataSource(Action<DataSourceBuilder> dataSource)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Action<DataSourceBuilder> | dataSource |
Returns
| Type | Description |
|---|---|
| DataSourceSettingsBuilder | null |
Examples
@{Html.EJ().Diagram("Diagram").Height("600px").DataSourceSettings(s => s.DataSource(ds => ds.URL("http://mvc.syncfusion.com/Services/Northwnd.svc/"))
        .Query(" ej.Query().from('Employees').select('EmployeeID,ReportsTo,FirstName')").Id("EmployeeID").
        Parent("ReportsTo").TableName("Employees"));}
Id(String)
Gets or sets the unique id of the data source items
Declaration
public DataSourceSettingsBuilder Id(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | id |
Returns
| Type | Description |
|---|---|
| DataSourceSettingsBuilder | null |
Examples
@{Html.EJ().Diagram("Diagram").Height("600px").
         DataSourceSettings(s => s.DataSource(ds => ds.URL("http://mvc.syncfusion.com/Services/Northwnd.svc/"))
        .Query(" ej.Query().from('Employees').select('EmployeeID,ReportsTo,FirstName')").Id("EmployeeID").
        Parent("ReportsTo").TableName("Employees"));}
Parent(String)
Gets or sets the parent id of the data source item
Declaration
public DataSourceSettingsBuilder Parent(string parent)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | parent |
Returns
| Type | Description |
|---|---|
| DataSourceSettingsBuilder | null |
Examples
@{Html.EJ().Diagram("Diagram").Height("600px").
         DataSourceSettings(s => s.DataSource(ds => ds.URL("http://mvc.syncfusion.com/Services/Northwnd.svc/"))
        .Query(" ej.Query().from('Employees').select('EmployeeID,ReportsTo,FirstName')").Id("EmployeeID").
        Parent("ReportsTo").TableName("Employees"));}
Query(String)
Gets or sets the query to filter data source
Declaration
public DataSourceSettingsBuilder Query(string query)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | query |
Returns
| Type | Description |
|---|---|
| DataSourceSettingsBuilder | Null |
Examples
@{Html.EJ().Diagram("Diagram").Height("600px").
         DataSourceSettings(s => s.DataSource(ds => ds.URL("http://mvc.syncfusion.com/Services/Northwnd.svc/"))
        .Query(" ej.Query().from('Employees').select('EmployeeID,ReportsTo,FirstName')").Id("EmployeeID").
        Parent("ReportsTo").TableName("Employees"));}
TableName(String)
Gets or sets the table name on the datasource
Declaration
public DataSourceSettingsBuilder TableName(string tableName)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | tableName |
Returns
| Type | Description |
|---|---|
| DataSourceSettingsBuilder | Null |
Examples
@{Html.EJ().Diagram("Diagram").Height("600px").
         DataSourceSettings(s => s.DataSource(ds => ds.URL("http://mvc.syncfusion.com/Services/Northwnd.svc/"))
        .Query(" ej.Query().from('Employees').select('EmployeeID,ReportsTo,FirstName')").Id("EmployeeID").
        Parent("ReportsTo").TableName("Employees"));}