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

Constructors

C#
public DiagramShapeModelDescriptorFactory(DiagramShapeModelDescriptor model)
Parameters:modelDiagramShapeModelDescriptor

Methods

Specifies the member used for the height of the shape.

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

The member name.

Example:
C#
@(Html.Kendo().Diagram<OrgChartShape, OrgChartConnection>()
.Name("diagram")
.DataSource(dataSource => dataSource
.ShapeDataSource()
.Model(m =>
{
m.Height("ShapeHeight");
})
)
)

Specifies the member used for the height of the shape.

C#
public void Height<TValue>(Expression<Func<TModel, TValue>> expression)
Parameters:expressionExpression<Func<TModel, TValue>>

Member access expression which describes the member

Example:
C#
@(Html.Kendo().Diagram&lt;OrgChartShape, OrgChartConnection&gt;()
.Name("diagram")
.DataSource(dataSource =&gt; dataSource
.ShapeDataSource()
.Model(m =&gt;
{
m.Height(f =&gt; f.ShapeHeight);
})
)
)

Specifies the member used for the text of the shape.

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

The member name.

Example:
C#
@(Html.Kendo().Diagram&lt;OrgChartShape, OrgChartConnection&gt;()
.Name("diagram")
.DataSource(dataSource =&gt; dataSource
.ShapeDataSource()
.Model(m =&gt;
{
m.Text("TextField");
})
)
)

Specifies the member used for the text of the shape.

C#
public void Text<TValue>(Expression<Func<TModel, TValue>> expression)
Parameters:expressionExpression<Func<TModel, TValue>>

Member access expression which describes the member

Example:
C#
@(Html.Kendo().Diagram&lt;OrgChartShape, OrgChartConnection&gt;()
.Name("diagram")
.DataSource(dataSource =&gt; dataSource
.ShapeDataSource()
.Model(m =&gt;
{
m.Text(f =&gt; f.TextField);
})
)
)

Specifies the member used for the type of the shape.

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

The member name.

Example:
C#
@(Html.Kendo().Diagram&lt;OrgChartShape, OrgChartConnection&gt;()
.Name("diagram")
.DataSource(dataSource =&gt; dataSource
.ShapeDataSource()
.Model(m =&gt;
{
m.Type("TypeField");
})
)
)

Specifies the member used for the type of the shape.

C#
public void Type<TValue>(Expression<Func<TModel, TValue>> expression)
Parameters:expressionExpression<Func<TModel, TValue>>

Member access expression which describes the member

Example:
C#
@(Html.Kendo().Diagram&lt;OrgChartShape, OrgChartConnection&gt;()
.Name("diagram")
.DataSource(dataSource =&gt; dataSource
.ShapeDataSource()
.Model(m =&gt;
{
m.Type(f =&gt; f.Type);
})
)
)

Specifies the member used for the width of the shape.

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

The member name.

Example:
C#
@(Html.Kendo().Diagram&lt;OrgChartShape, OrgChartConnection&gt;()
.Name("diagram")
.DataSource(dataSource =&gt; dataSource
.ShapeDataSource()
.Model(m =&gt;
{
m.Width("ShapeWidth");
})
)
)

Specifies the member used for the width of the shape.

C#
public void Width<TValue>(Expression<Func<TModel, TValue>> expression)
Parameters:expressionExpression<Func<TModel, TValue>>

Member access expression which describes the member

Example:
C#
@(Html.Kendo().Diagram&lt;OrgChartShape, OrgChartConnection&gt;()
.Name("diagram")
.DataSource(dataSource =&gt; dataSource
.ShapeDataSource()
.Model(m =&gt;
{
m.Width(f =&gt; f.ShapeWidth);
})
)
)

Specifies the member used for the x-coordinate of the shape.

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

The member name.

Example:
C#
@(Html.Kendo().Diagram&lt;OrgChartShape, OrgChartConnection&gt;()
.Name("diagram")
.DataSource(dataSource =&gt; dataSource
.ShapeDataSource()
.Model(m =&gt;
{
m.X("XField");
})
)
)

Specifies the member used for the x-coordinate of the shape.

C#
public void X<TValue>(Expression<Func<TModel, TValue>> expression)
Parameters:expressionExpression<Func<TModel, TValue>>

Member access expression which describes the member

Example:
C#
@(Html.Kendo().Diagram&lt;OrgChartShape, OrgChartConnection&gt;()
.Name("diagram")
.DataSource(dataSource =&gt; dataSource
.ShapeDataSource()
.Model(m =&gt;
{
m.X(f =&gt; f.XField);
})
)
)

Specifies the member used for the y-coordinate of the shape.

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

The member name.

Example:
C#
@(Html.Kendo().Diagram&lt;OrgChartShape, OrgChartConnection&gt;()
.Name("diagram")
.DataSource(dataSource =&gt; dataSource
.ShapeDataSource()
.Model(m =&gt;
{
m.Y("YField");
})
)
)

Specifies the member used for the y-coordinate of the shape.

C#
public void Y<TValue>(Expression<Func<TModel, TValue>> expression)
Parameters:expressionExpression<Func<TModel, TValue>>

Member access expression which describes the member

Example:
C#
@(Html.Kendo().Diagram&lt;OrgChartShape, OrgChartConnection&gt;()
.Name("diagram")
.DataSource(dataSource =&gt; dataSource
.ShapeDataSource()
.Model(m =&gt;
{
m.Y(f =&gt; f.YField);
})
)
)