DataSourceTreeListModelFieldDescriptorBuilder
Methods
Nullable(System.Boolean)
Specifies if the defaultValue setting should be used. The default is false.
Parameters
value - System.Boolean
The value
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).Nullable(true);
})
)
)
DefaultValue(Kendo.Mvc.UI.Fluent.T)
Parameters
value - T
DefaultValue(System.Object)
Sets the value which will be used to populate the field when new non-existing model is created.
Parameters
value - System.Object
The value
Editable()
Specifies if the field should be editable.
Example
.DataSource(dataSource => dataSource
.Ajax()
.Model(m => m.Field(f => f.ShipName).Editable())
)
Editable(System.Boolean)
Specifies if the field should be editable.
Parameters
enabled - System.Boolean
True is the field should be editable, otherwise false
Example
.DataSource(dataSource => dataSource
.Ajax()
.Model(m => m.Field(f => f.ShipName).Editable(false))
)