New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent interface for configuring the DataSource Model definition.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Type Parameters:

TModel

Type of the model

Syntax:

C#
public class ReadOnlyCustomDataSourceModelDescriptorFactory<TModel> : DataSourceModelDescriptorFactoryBase<TModel> where TModel : class

Inheritance: objectDataSourceModelDescriptorFactoryBase<TModel>ReadOnlyCustomDataSourceModelDescriptorFactory<TModel>

Inherited Members DataSourceModelDescriptorFactoryBase<TModel>.modelDataSourceModelDescriptorFactoryBase<TModel>.GetDataKeyForField(string)object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

C#
public ReadOnlyCustomDataSourceModelDescriptorFactory(ModelDescriptor model)
Parameters:modelModelDescriptor

Methods

Describes a Model field

C#
public virtual CustomDataSourceModelFieldDescriptorBuilder<TModel> Field(string memberName, Type memberType)
Parameters:memberNamestring

Field name

memberTypeType

Field type

Returns:

CustomDataSourceModelFieldDescriptorBuilder<TModel>

Example:
C#
@(Html.Kendo().DropDownList()
.Name("ddl")
.DataSource(ds=&gt; ds
.Custom())
.Schema(s=&gt;s.Model(m=&gt;m.Field("Field", typeof(string))))
)

Specify the member used to identify an unique Model instance.

C#
public void Id(string fieldName)
Parameters:fieldNamestring

The member name.

Example:
C#
@(Html.Kendo().DropDownList()
.Name("ddl")
.DataSource(ds=&gt; ds
.Custom())
.Schema(s=&gt;s.Model(m=&gt;m.Id("ID")))
)