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

Kendo UI SchedulerResource TagHelper SchedulerResourceTagHelper class.

Definition

Namespace:Kendo.Mvc.TagHelpers

Assembly:Kendo.Mvc.dll

Syntax:

C#
[HtmlTargetElement("resource", ParentTag = "resources", TagStructure = TagStructure.NormalOrSelfClosing)]
[RestrictChildren("datasource", new string[] { "icon" })]
[SuppressTagRendering]
public class SchedulerResourceTagHelper : TagHelperCollectionItemBase, ITagHelper, ITagHelperComponent, IDataBoundWidget<DataSourceTagHelper>

Inheritance: objectTagHelperTagHelperChildBaseTagHelperCollectionItemBaseSchedulerResourceTagHelper

Implements: IDataBoundWidget<DataSourceTagHelper>ITagHelperITagHelperComponent

Inherited Members TagHelperChildBase.Init(TagHelperContext)TagHelperChildBase.AddSelfToContext(TagHelperContext)TagHelperChildBase.CreateHandler(string)TagHelperChildBase.IdPrefixTagHelper.Process(TagHelperContext, TagHelperOutput)TagHelper.Orderobject.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Example:

csharp
@addTagHelper *, Kendo.Mvc

@{
    var roomsData = new[]
    {
        new { Text = "Meeting Room 101", Value = 1, Color = "#6eb3fa" },
        new { Text = "Meeting Room 201", Value = 2, Color = "#f58a8a" }
    };
}

<kendo-scheduler name="scheduler">
    <resources>
        <resource name="Room" field="resourceField" bind-to="@roomsData">
            <datasource></datasource>
        </resource>
    </resources>
</kendo-scheduler>

Child Tagsdatasourceicon

Constructors

Initializes a new instance of the SchedulerResourceTagHelper class.

C#
public SchedulerResourceTagHelper()

Properties

Sets the data for the datasource

C#
[HtmlAttributeName("bind-to")]
public IEnumerable<object> BindTo { get; set; }

The field of the resource data item which contains the resource color.

C#
[HtmlAttributeName("datacolorfield")]
public string DataColorField { get; set; }

The field of the resource data item which represents the resource value. The resource value is used to link a scheduler event with a resource.

C#
[HtmlAttributeName("dataparentvaluefield")]
public string DataParentValueField { get; set; }

The field of the resource data item which represents the resource text.

C#
[HtmlAttributeName("datatextfield")]
public string DataTextField { get; set; }

The field of the resource data item which represents the resource value. The resource value is used to link a scheduler event with a resource.

C#
[HtmlAttributeName("datavaluefield")]
public string DataValueField { get; set; }

The field of the scheduler event which contains the resource id.

C#
public string Field { get; set; }

The name of the icon displayed instead of the resource text label in the desktop event editor. When the option is not set, the editor displays the resource title, or its existing field-name fallback.Set this option to an icon descriptor such as { name: "gear", variant: "outline" }. The variant can be outline, solid, or duotone; it applies to SVG rendering and is ignored for font icons.

C#
[HtmlAttributeName("icon")]
public string Icon { get; set; }

If set to true the scheduler event can be assigned multiple instances of the resource. The scheduler event field specified via the field option will contain an array of resources. By default only one resource instance can be assigned to an event.

C#
public bool? Multiple { get; set; }

The name of the resource used to distinguish resource. If not set the value of the field option is used.

C#
public string Name { get; set; }

The user friendly title of the resource displayed in the scheduler edit form. If not set the value of the field option is used.

C#
public string Title { get; set; }

Set to false if the scheduler event field specified via the field option contains a resource data item. By default the scheduler expects that field to contain a primitive value (string, number) which corresponds to the "value" of the resource (specified via dataValueField).

C#
public bool? ValuePrimitive { get; set; }

Methods

Adds the current TagHelper instance to its parent TagHelper.

C#
protected override void AddSelfToParent(TagHelperContext context)
Parameters:contextTagHelperContext

The TagHelper context.

Overrides: TagHelperChildBase.AddSelfToParent(TagHelperContext)

C#
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Parameters:contextTagHelperContextoutputTagHelperOutputReturns:

Task

Overrides: TagHelperChildBase.ProcessAsync(TagHelperContext, TagHelperOutput)

Serializes the defined settings.

C#
public Dictionary<string, object> Serialize()
Returns:

Dictionary<string, object>