ASP.NET MVC - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class MentionBuilder

    Show / Hide Table of Contents

    Class MentionBuilder

    Inheritance
    System.Object
    ControlBuilder
    MentionBuilder
    Inherited Members
    ControlBuilder.Context
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Syncfusion.EJ2.DropDowns
    Assembly: Syncfusion.EJ2.dll
    Syntax
    public class MentionBuilder : ControlBuilder

    Constructors

    MentionBuilder()

    Declaration
    public MentionBuilder()

    MentionBuilder(Mention)

    Declaration
    public MentionBuilder(Mention model)
    Parameters
    Type Name Description
    Mention model

    Fields

    model

    Declaration
    public Mention model
    Field Value
    Type Description
    Mention

    Properties

    HtmlAttr

    Declaration
    public IDictionary<string, object> HtmlAttr { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IDictionary<System.String, System.Object>

    ID

    Declaration
    public string ID { get; set; }
    Property Value
    Type Description
    System.String

    Output

    Declaration
    public override TextWriter Output { get; set; }
    Property Value
    Type Description
    System.IO.TextWriter
    Overrides
    ControlBuilder.Output

    Methods

    ActionBegin(String)

    Triggers before fetching data from the remote server.

    Declaration
    public MentionBuilder ActionBegin(string actionBegin)
    Parameters
    Type Name Description
    System.String actionBegin
    Returns
    Type Description
    MentionBuilder

    ActionComplete(String)

    Triggers after data is fetched successfully from the remote server.

    Declaration
    public MentionBuilder ActionComplete(string actionComplete)
    Parameters
    Type Name Description
    System.String actionComplete
    Returns
    Type Description
    MentionBuilder

    ActionFailure(String)

    Triggers when the data fetch request from the remote server fails.

    Declaration
    public MentionBuilder ActionFailure(string actionFailure)
    Parameters
    Type Name Description
    System.String actionFailure
    Returns
    Type Description
    MentionBuilder

    AllowSpaces(Boolean)

    Defines whether to allow the space in the middle of mention while searching. When disabled, the space ends the mention component search.

    Declaration
    public MentionBuilder AllowSpaces(bool allowSpaces = true)
    Parameters
    Type Name Description
    System.Boolean allowSpaces
    Returns
    Type Description
    MentionBuilder

    BeforeOpen(String)

    Triggers before the popup is opened.

    Declaration
    public MentionBuilder BeforeOpen(string beforeOpen)
    Parameters
    Type Name Description
    System.String beforeOpen
    Returns
    Type Description
    MentionBuilder

    Change(String)

    Triggers when an item in a popup is selected and updated in an editor.

    Declaration
    public MentionBuilder Change(string change)
    Parameters
    Type Name Description
    System.String change
    Returns
    Type Description
    MentionBuilder

    Closed(String)

    Triggers after the popup is closed.

    Declaration
    public MentionBuilder Closed(string closed)
    Parameters
    Type Name Description
    System.String closed
    Returns
    Type Description
    MentionBuilder

    ContentTemplate(Action<Object>)

    Declaration
    public MentionBuilder ContentTemplate(Action<object> template)
    Parameters
    Type Name Description
    System.Action<System.Object> template
    Returns
    Type Description
    MentionBuilder

    ContentTemplate(Func<Object, Object>)

    Declaration
    public MentionBuilder ContentTemplate(Func<object, object> template)
    Parameters
    Type Name Description
    System.Func<System.Object, System.Object> template
    Returns
    Type Description
    MentionBuilder

    Created(String)

    Triggers when the component is created.

    Declaration
    public MentionBuilder Created(string created)
    Parameters
    Type Name Description
    System.String created
    Returns
    Type Description
    MentionBuilder

    CssClass(String)

    Defines class/multiple classes separated by a space for the mention component.

    Declaration
    public MentionBuilder CssClass(string cssClass)
    Parameters
    Type Name Description
    System.String cssClass
    Returns
    Type Description
    MentionBuilder

    DataSource(Action<DataManagerBuilder>)

    Declaration
    public MentionBuilder DataSource(Action<DataManagerBuilder> dataSource)
    Parameters
    Type Name Description
    System.Action<DataManagerBuilder> dataSource
    Returns
    Type Description
    MentionBuilder

    DataSource(Double[])

    Accepts the list items either through local or remote service and binds it to the component. It can be an array of JSON Objects or an instance of DataManager.

    Declaration
    public MentionBuilder DataSource(double[] dataSource)
    Parameters
    Type Name Description
    System.Double[] dataSource
    Returns
    Type Description
    MentionBuilder

    DataSource(Object)

    Accepts the list items either through local or remote service and binds it to the component. It can be an array of JSON Objects or an instance of DataManager.

    Declaration
    public MentionBuilder DataSource(object dataSource)
    Parameters
    Type Name Description
    System.Object dataSource
    Returns
    Type Description
    MentionBuilder

    DataSource(String[])

    Accepts the list items either through local or remote service and binds it to the component. It can be an array of JSON Objects or an instance of DataManager.

    Declaration
    public MentionBuilder DataSource(string[] dataSource)
    Parameters
    Type Name Description
    System.String[] dataSource
    Returns
    Type Description
    MentionBuilder

    Destroyed(String)

    Triggers when the component is destroyed.

    Declaration
    public MentionBuilder Destroyed(string destroyed)
    Parameters
    Type Name Description
    System.String destroyed
    Returns
    Type Description
    MentionBuilder

    DisplayTemplate(String)

    Specifies the template for the selected value from the suggestion list.

    Declaration
    public MentionBuilder DisplayTemplate(string displayTemplate)
    Parameters
    Type Name Description
    System.String displayTemplate
    Returns
    Type Description
    MentionBuilder

    Fields(MentionFieldSettings)

    Defines the fields of the Mention to map with the data source and binds the data to the component. text - Specifies the text that maps the text filed from the data source for each list item. value - Specifies the value that maps the value filed from the data source for each list item. iconCss - Specifies the iconCss that map the icon class filed from the data source for each list item. groupBy - Specifies the groupBy that groups the list items with its related items by mapping groupBy field.

    Declaration
    public MentionBuilder Fields(MentionFieldSettings fields)
    Parameters
    Type Name Description
    MentionFieldSettings fields
    Returns
    Type Description
    MentionBuilder

    Fields(Action<MentionFieldSettingsBuilder>)

    Declaration
    public MentionBuilder Fields(Action<MentionFieldSettingsBuilder> fields)
    Parameters
    Type Name Description
    System.Action<MentionFieldSettingsBuilder> fields
    Returns
    Type Description
    MentionBuilder

    Filtering(String)

    Triggers on typing a character in the component.

    Declaration
    public MentionBuilder Filtering(string filtering)
    Parameters
    Type Name Description
    System.String filtering
    Returns
    Type Description
    MentionBuilder

    FilterType(FilterType)

    Determines on which filter type, the component needs to be considered on search action. and its supported data types are

    Declaration
    public MentionBuilder FilterType(FilterType filterType)
    Parameters
    Type Name Description
    FilterType filterType
    Returns
    Type Description
    MentionBuilder

    Highlight(Boolean)

    Specifies whether to highlight the searched characters on suggestion list items.

    Declaration
    public MentionBuilder Highlight(bool highlight = true)
    Parameters
    Type Name Description
    System.Boolean highlight
    Returns
    Type Description
    MentionBuilder

    HtmlAttributes(Object)

    Allows additional HTML attributes such as title, name, etc., and accepts n number of attributes in a key-value pair format.

    Declaration
    public MentionBuilder HtmlAttributes(object htmlAttributes)
    Parameters
    Type Name Description
    System.Object htmlAttributes
    Returns
    Type Description
    MentionBuilder

    IgnoreCase(Boolean)

    Specifies whether the searches are case sensitive to find suggestions.

    Declaration
    public MentionBuilder IgnoreCase(bool ignoreCase = true)
    Parameters
    Type Name Description
    System.Boolean ignoreCase
    Returns
    Type Description
    MentionBuilder

    ItemTemplate(String)

    Specifies the template for the suggestion list.

    Declaration
    public MentionBuilder ItemTemplate(string itemTemplate)
    Parameters
    Type Name Description
    System.String itemTemplate
    Returns
    Type Description
    MentionBuilder

    Locale(String)

    Overrides the global culture and localization value for this component. Default global culture is ‘en-US’.

    Declaration
    public MentionBuilder Locale(string locale)
    Parameters
    Type Name Description
    System.String locale
    Returns
    Type Description
    MentionBuilder

    MentionChar(Char)

    Specifies the symbol or single character which triggers the search action in the mention component.

    Declaration
    public MentionBuilder MentionChar(char mentionChar)
    Parameters
    Type Name Description
    System.Char mentionChar
    Returns
    Type Description
    MentionBuilder

    MinLength(Int32)

    Specifies the minimum length of user input to initiate the search action. The default value is zero, where suggestion the list opened as soon as the user inputs the mention character.

    Declaration
    public MentionBuilder MinLength(int minLength)
    Parameters
    Type Name Description
    System.Int32 minLength
    Returns
    Type Description
    MentionBuilder

    NoRecordsTemplate(String)

    Specifies the template for no matched item which is displayed when there are no items to display in the suggestion list.

    Declaration
    public MentionBuilder NoRecordsTemplate(string noRecordsTemplate)
    Parameters
    Type Name Description
    System.String noRecordsTemplate
    Returns
    Type Description
    MentionBuilder

    Opened(String)

    Triggers after the popup opens.

    Declaration
    public MentionBuilder Opened(string opened)
    Parameters
    Type Name Description
    System.String opened
    Returns
    Type Description
    MentionBuilder

    PopupHeight(String)

    Specifies the height of the popup in pixels/number/percentage. The number value is considered as pixels.

    Declaration
    public MentionBuilder PopupHeight(string popupHeight)
    Parameters
    Type Name Description
    System.String popupHeight
    Returns
    Type Description
    MentionBuilder

    PopupWidth(String)

    Specifies the width of the popup in pixels/number/percentage. The number value is considered as pixels.

    Declaration
    public MentionBuilder PopupWidth(string popupWidth)
    Parameters
    Type Name Description
    System.String popupWidth
    Returns
    Type Description
    MentionBuilder

    Query(String)

    Specifies the external query, which can be customized and filtered against the data source.

    Declaration
    public MentionBuilder Query(string query)
    Parameters
    Type Name Description
    System.String query
    Returns
    Type Description
    MentionBuilder

    Render()

    Declaration
    public HtmlString Render()
    Returns
    Type Description
    System.Web.HtmlString

    Select(String)

    Triggers when an item in the popup is selected by the user either with the mouse/tap or with keyboard navigation.

    Declaration
    public MentionBuilder Select(string select)
    Parameters
    Type Name Description
    System.String select
    Returns
    Type Description
    MentionBuilder

    ShowMentionChar(Boolean)

    Specifies whether to show the configured mentionChar with the text.

    Declaration
    public MentionBuilder ShowMentionChar(bool showMentionChar = true)
    Parameters
    Type Name Description
    System.Boolean showMentionChar
    Returns
    Type Description
    MentionBuilder

    SortOrder(SortOrder)

    Specifies the order to sort the data source. The possible sort orders are, None - The data source is not sorted. Ascending - The data source is sorted in ascending order. Descending - The data source is sorted in descending order.

    Declaration
    public MentionBuilder SortOrder(SortOrder sortOrder)
    Parameters
    Type Name Description
    SortOrder sortOrder
    Returns
    Type Description
    MentionBuilder

    SpinnerTemplate(String)

    Specifies the template for showing until data is loaded in the popup.

    Declaration
    public MentionBuilder SpinnerTemplate(string spinnerTemplate)
    Parameters
    Type Name Description
    System.String spinnerTemplate
    Returns
    Type Description
    MentionBuilder

    SuffixText(String)

    Specifies the custom suffix to append along with the mention component selected item while inserting. You can append space or new line character as suffix.

    Declaration
    public MentionBuilder SuffixText(string suffixText)
    Parameters
    Type Name Description
    System.String suffixText
    Returns
    Type Description
    MentionBuilder

    SuggestionCount(Int32)

    Specifies the number of items in the suggestion list.

    Declaration
    public MentionBuilder SuggestionCount(int suggestionCount)
    Parameters
    Type Name Description
    System.Int32 suggestionCount
    Returns
    Type Description
    MentionBuilder

    Target(String)

    Specifies the target selector where the mention component needs to be displayed. The mention component listens to the target's user input and displays suggestions as soon as the user inputs the mention character.

    Declaration
    public MentionBuilder Target(string target)
    Parameters
    Type Name Description
    System.String target
    Returns
    Type Description
    MentionBuilder
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved