Class ListView
Inherited Members
Namespace: Syncfusion.EJ2.Lists
Assembly: Syncfusion.EJ2.dll
Syntax
public class ListView : EJTagHelper
Constructors
ListView()
Declaration
public ListView()
Properties
ActionBegin
Triggers when every ListView action starts.
Declaration
[HtmlAttributeName("actionBegin")]
public string ActionBegin { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
ActionComplete
Triggers when every ListView actions completed.
Declaration
[HtmlAttributeName("actionComplete")]
public string ActionComplete { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
ActionFailure
Triggers, when the data fetch request from the remote server, fails.
Declaration
[HtmlAttributeName("actionFailure")]
public string ActionFailure { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Animation
The animation
property provides an option to apply the different
animations on the ListView component.
Declaration
[HtmlAttributeName("animation")]
public object Animation { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The default value is null |
CheckBoxPosition
The checkBoxPosition
is used to set the position of check box in a list item.
By default, the checkBoxPosition
is Left, which will appear before the text content in a list item.
Declaration
[HtmlAttributeName("checkBoxPosition")]
public CheckBoxPosition CheckBoxPosition { get; set; }
Property Value
Type | Description |
---|---|
CheckBoxPosition | The default value is CheckBoxPosition.Left |
CssClass
The cssClass
property is used to add a user-preferred class name in the root element of the ListView,
using which we can customize the component (both CSS and functionality customization)
Declaration
[HtmlAttributeName("cssClass")]
public string CssClass { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
DataSource
The dataSource
provides the data to render the ListView component which is mapped with the fields of ListView.
Declaration
[HtmlAttributeName("dataSource")]
public object DataSource { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The default value is null |
Enable
If enable
set to true, the list items are enabled.
And, we can disable the component using this property by setting its value as false.
Declaration
[HtmlAttributeName("enable")]
public bool Enable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true |
EnableHtmlSanitizer
Specifies whether HTML content should be sanitized or escaped.
When set to true
, any HTML content will be sanitized to remove potentially harmful elements.
Declaration
[HtmlAttributeName("enableHtmlSanitizer")]
public bool EnableHtmlSanitizer { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
EnablePersistence
Enable or disable persisting component's state between page reloads.
Declaration
[HtmlAttributeName("enablePersistence")]
public bool EnablePersistence { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
EnableRtl
Enable or disable rendering component in right to left direction.
Declaration
[HtmlAttributeName("enableRtl")]
public bool EnableRtl { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
EnableVirtualization
If enableVirtualization
set to true, which will increase the ListView performance, while loading a large amount of data.
Declaration
[HtmlAttributeName("enableVirtualization")]
public bool EnableVirtualization { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
Fields
The fields
is used to map keys from the dataSource which extracts the appropriate data from the dataSource
with specified mapped with the column fields to render the ListView.
Declaration
[HtmlAttributeName("fields")]
public ListViewFieldSettings Fields { get; set; }
Property Value
Type | Description |
---|---|
ListViewFieldSettings | The default value is null |
GroupTemplate
The ListView has an option to custom design the group header title with the help of groupTemplate
property.
Declaration
[HtmlAttributeName("groupTemplate")]
public string GroupTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
HeaderTemplate
The ListView has an option to custom design the ListView header title with the help of headerTemplate
property.
Declaration
[HtmlAttributeName("headerTemplate")]
public string HeaderTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
HeaderTitle
The headerTitle
is used to set the title of the ListView component.
Declaration
[HtmlAttributeName("headerTitle")]
public string HeaderTitle { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
Height
Defines the height of the ListView component which accepts both string and number values.
Declaration
[HtmlAttributeName("height")]
public string Height { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
HtmlAttributes
The htmlAttributes
allows additional attributes such as id, class, etc., and
accepts n number of attributes in a key-value pair format.
Declaration
[HtmlAttributeName("htmlAttributes")]
public object HtmlAttributes { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The default value is null |
Locale
Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
Declaration
[HtmlAttributeName("locale")]
public string Locale { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |
Query
The query
is used to fetch the specific data from dataSource by using where and select keywords.
Declaration
[HtmlAttributeName("query")]
public string Query { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Select
Triggers when we select the list item in the component.
Declaration
[HtmlAttributeName("select")]
public string Select { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
ShowCheckBox
If showCheckBox
set to true, which will show or hide the checkbox.
Declaration
[HtmlAttributeName("showCheckBox")]
public bool ShowCheckBox { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
ShowHeader
If showHeader
set to true, which will show or hide the header of the ListView component.
Declaration
[HtmlAttributeName("showHeader")]
public bool ShowHeader { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
ShowIcon
If showIcon
set to true, which will show or hide the icon of the list item.
Declaration
[HtmlAttributeName("showIcon")]
public bool ShowIcon { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is false |
SortOrder
The sortOrder
is used to sort the data source. The available type of sort orders are,
None
- The data source is not sorting.
Ascending
- The data source is sorting with ascending order.
Descending
- The data source is sorting with descending order.
Declaration
[HtmlAttributeName("sortOrder")]
public SortOrder SortOrder { get; set; }
Property Value
Type | Description |
---|---|
SortOrder | The default value is SortOrder.None |
Template
The ListView component supports to customize the content of each list items with the help of template
property.
Declaration
[HtmlAttributeName("template")]
public string Template { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Width
Defines the width of the ListView component which accepts both string and number values.
Declaration
[HtmlAttributeName("width")]
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |