Class ListView
Inheritance
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
public string ActionBegin { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
ActionComplete
Triggers when every ListView actions completed.
Declaration
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
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
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
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
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
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
public bool Enable { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true |
EnableHtmlSanitizer
Specifies whether to display or remove the untrusted HTML values in the ListView component. If 'enableHtmlSanitizer' set to true, the component will sanitize any suspected untrusted strings and scripts before rendering them.
Declaration
public bool EnableHtmlSanitizer { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true |
EnablePersistence
Enable or disable persisting component's state between page reloads.
Declaration
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
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
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
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
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
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
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
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
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
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
public string Query { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is null |
Scroll
Triggers when scrollbar of the ListView component reaches to the top or bottom.
Declaration
public string Scroll { 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
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
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
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
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
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
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
public string Width { get; set; }
Property Value
Type | Description |
---|---|
System.String | The default value is "" |