Class MentionBuilder
Inheritance
System.Object
MentionBuilder
Assembly: Syncfusion.EJ2.dll
Syntax
public class MentionBuilder : ControlBuilder
Constructors
MentionBuilder()
Declaration
MentionBuilder(Mention)
Declaration
public MentionBuilder(Mention model)
Parameters
Type |
Name |
Description |
Mention |
model |
|
Fields
model
Declaration
Field Value
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
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
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
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
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
BeforeOpen(String)
Triggers before the popup is opened.
Declaration
public MentionBuilder BeforeOpen(string beforeOpen)
Parameters
Type |
Name |
Description |
System.String |
beforeOpen |
|
Returns
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
Closed(String)
Triggers after the popup is closed.
Declaration
public MentionBuilder Closed(string closed)
Parameters
Type |
Name |
Description |
System.String |
closed |
|
Returns
ContentTemplate(Action<Object>)
Declaration
public MentionBuilder ContentTemplate(Action<object> template)
Parameters
Type |
Name |
Description |
System.Action<System.Object> |
template |
|
Returns
ContentTemplate(Func<Object, Object>)
Declaration
public MentionBuilder ContentTemplate(Func<object, object> template)
Parameters
Type |
Name |
Description |
System.Func<System.Object, System.Object> |
template |
|
Returns
Created(String)
Triggers when the component is created.
Declaration
public MentionBuilder Created(string created)
Parameters
Type |
Name |
Description |
System.String |
created |
|
Returns
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
DataSource(Action<DataManagerBuilder>)
Declaration
public MentionBuilder DataSource(Action<DataManagerBuilder> dataSource)
Parameters
Returns
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
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
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
Destroyed(String)
Triggers when the component is destroyed.
Declaration
public MentionBuilder Destroyed(string destroyed)
Parameters
Type |
Name |
Description |
System.String |
destroyed |
|
Returns
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
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
Returns
Fields(Action<MentionFieldSettingsBuilder>)
Declaration
public MentionBuilder Fields(Action<MentionFieldSettingsBuilder> fields)
Parameters
Returns
Filtering(String)
Triggers on typing a character in the component.
Declaration
public MentionBuilder Filtering(string filtering)
Parameters
Type |
Name |
Description |
System.String |
filtering |
|
Returns
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
Returns
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
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
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
ItemTemplate(String)
Specifies the template for the suggestion list.
Declaration
public MentionBuilder ItemTemplate(string itemTemplate)
Parameters
Type |
Name |
Description |
System.String |
itemTemplate |
|
Returns
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
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
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
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
Opened(String)
Triggers after the popup opens.
Declaration
public MentionBuilder Opened(string opened)
Parameters
Type |
Name |
Description |
System.String |
opened |
|
Returns
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
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
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
Render()
Declaration
public HtmlString Render()
Returns
Type |
Description |
Microsoft.AspNetCore.Html.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
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
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
Returns
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
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
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
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