DataSourceTreeListModelDescriptorFactory
Methods
ParentId(System.Linq.Expressions.Expression)
Specify the member used for the parentId field.
Parameters
expression - System.Linq.Expressions.Expression<Func>
Member access expression which describes the member
Example
@(Html.Kendo().TreeList<OrderViewModel>()
.Name("treelist")
.Columns(columns =>
{
columns.Add().Field(e => e.OrderID);
})
.DataSource(dataSource => dataSource
.Read(read => read.Action("All", "Orders"))
.Model(m => {
m.ParentId(x => x.ParentId);
})
)
)
ParentId(System.String)
Specify the member used for the parentId field.
Parameters
memberName - System.String
The member name.
Example
@(Html.Kendo().TreeList<OrderViewModel>()
.Name("treelist")
.Columns(columns =>
{
columns.Add().Field(e => e.OrderID);
})
.DataSource(dataSource => dataSource
.Read(read => read.Action("All", "Orders"))
.Model(m => {
m.ParentId("ParentId");
})
)
)
Expanded(System.Linq.Expressions.Expression)
Specify the member used for the expanded field.
Parameters
expression - System.Linq.Expressions.Expression<Func>
Member access expression which describes the member
Example
@(Html.Kendo().TreeList<OrderViewModel>()
.Name("treelist")
.Columns(columns =>
{
columns.Add().Field(e => e.OrderID);
})
.DataSource(dataSource => dataSource
.Read(read => read.Action("All", "Orders"))
.Model(m => {
m.Expanded(x=>x.OrderID);
})
)
)
Expanded(System.String)
Specify the member used for the expanded field.
Parameters
memberName - System.String
The member name.
Example
@(Html.Kendo().TreeList<OrderViewModel>()
.Name("treelist")
.Columns(columns =>
{
columns.Add().Field(e => e.OrderID);
})
.DataSource(dataSource => dataSource
.Read(read => read.Action("All", "Orders"))
.Model(m => {
m.Expanded<string>("OrderID");
})
)
)
Expanded(System.Boolean)
Specify the default value of the expanded field.
Parameters
defaultValue - System.Boolean
True/False.
Example
@(Html.Kendo().TreeList<OrderViewModel>()
.Name("treelist")
.Columns(columns =>
{
columns.Add().Field(e => e.OrderID);
})
.DataSource(dataSource => dataSource
.Read(read => read.Action("All", "Orders"))
.Model(m => {
m.Expanded(true);
})
)
)
Id(System.String)
Specify the member used to identify an unique Model instance.
Parameters
fieldName - System.String
The member name.
Example
@(Html.Kendo().TreeList<OrderViewModel>()
.Name("treelist")
.Columns(columns =>
{
columns.Add().Field(e => e.OrderID);
})
.DataSource(dataSource => dataSource
.Read(read => read.Action("All", "Orders"))
.Model(m => {
m.Id("OrderID");
})
)
)
Id(System.Linq.Expressions.Expression)
Specify the member used to identify an unique Model instance.
Parameters
expression - System.Linq.Expressions.Expression<Func>
Member access expression which describes the member
Example
@(Html.Kendo().TreeList<OrderViewModel>()
.Name("treelist")
.Columns(columns =>
{
columns.Add().Field(e => e.OrderID);
})
.DataSource(dataSource => dataSource
.Read(read => read.Action("All", "Orders"))
.Model(m => {
m.Id(x => x.OrderID);
})
)
)
Field(System.Linq.Expressions.Expression)
Describes a Model field
Parameters
expression - System.Linq.Expressions.Expression<Func>
Member access expression which describes the field
Example
@(Html.Kendo().TreeList<OrderViewModel>()
.Name("treelist")
.Columns(columns =>
{
columns.Add().Field(e => e.OrderID);
})
.DataSource(dataSource => dataSource
.Read(read => read.Action("All", "Orders"))
.Model(m => {
m.Field(x=>x.OrderID);
})
)
)
Field(System.String,System.Type)
Describes a Model field
Parameters
memberName - System.String
Field name
memberType - System.Type
Field type
Example
@(Html.Kendo().TreeList<OrderViewModel>()
.Name("treelist")
.Columns(columns =>
{
columns.Add().Field(e => e.OrderID);
})
.DataSource(dataSource => dataSource
.Read(read => read.Action("All", "Orders"))
.Model(m => {
m.Field("OrderID", typeof(string));
})
)
)
Field(System.String)
Describes a Model field
Parameters
memberName - System.String
Member name
Example
@(Html.Kendo().TreeList<OrderViewModel>()
.Name("treelist")
.Columns(columns =>
{
columns.Add().Field(e => e.OrderID);
})
.DataSource(dataSource => dataSource
.Read(read => read.Action("All", "Orders"))
.Model(m => {
m.Field("OrderID");
})
)
)