Class ListViewBuilder
Inheritance
System.Object
ListViewBuilder
Assembly: Syncfusion.EJ2.dll
Syntax
public class ListViewBuilder : ControlBuilder
Constructors
ListViewBuilder()
Declaration
ListViewBuilder(ListView)
Declaration
public ListViewBuilder(ListView model)
Parameters
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 when every ListView action starts.
Declaration
public ListViewBuilder ActionBegin(string actionBegin)
Parameters
Type |
Name |
Description |
System.String |
actionBegin |
|
Returns
ActionComplete(String)
Triggers when every ListView actions completed.
Declaration
public ListViewBuilder 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 ListViewBuilder ActionFailure(string actionFailure)
Parameters
Type |
Name |
Description |
System.String |
actionFailure |
|
Returns
Animation(Object)
The animation
property provides an option to apply the different
animations on the ListView component.
Declaration
public ListViewBuilder Animation(object animation)
Parameters
Type |
Name |
Description |
System.Object |
animation |
|
Returns
CheckBoxPosition(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 ListViewBuilder CheckBoxPosition(CheckBoxPosition checkBoxPosition)
Parameters
Returns
CssClass(String)
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 ListViewBuilder CssClass(string cssClass)
Parameters
Type |
Name |
Description |
System.String |
cssClass |
|
Returns
DataSource(Action<DataManagerBuilder>)
Declaration
public ListViewBuilder DataSource(Action<DataManagerBuilder> dataSource)
Parameters
Returns
DataSource(Double[])
The dataSource
provides the data to render the ListView component which is mapped with the fields of ListView.
Declaration
public ListViewBuilder DataSource(double[] dataSource)
Parameters
Type |
Name |
Description |
System.Double[] |
dataSource |
|
Returns
DataSource(Object)
The dataSource
provides the data to render the ListView component which is mapped with the fields of ListView.
Declaration
public ListViewBuilder DataSource(object dataSource)
Parameters
Type |
Name |
Description |
System.Object |
dataSource |
|
Returns
DataSource(String[])
The dataSource
provides the data to render the ListView component which is mapped with the fields of ListView.
Declaration
public ListViewBuilder DataSource(string[] dataSource)
Parameters
Type |
Name |
Description |
System.String[] |
dataSource |
|
Returns
Enable(Boolean)
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 ListViewBuilder Enable(bool enable = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enable |
|
Returns
EnableHtmlSanitizer(Boolean)
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
public ListViewBuilder EnableHtmlSanitizer(bool enableHtmlSanitizer = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableHtmlSanitizer |
|
Returns
EnablePersistence(Boolean)
Enable or disable persisting component's state between page reloads.
Declaration
public ListViewBuilder EnablePersistence(bool enablePersistence = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enablePersistence |
|
Returns
EnableRtl(Boolean)
Enable or disable rendering component in right to left direction.
Declaration
public ListViewBuilder EnableRtl(bool enableRtl = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableRtl |
|
Returns
EnableVirtualization(Boolean)
If enableVirtualization
set to true, which will increase the ListView performance, while loading a large amount of data.
Declaration
public ListViewBuilder EnableVirtualization(bool enableVirtualization = true)
Parameters
Type |
Name |
Description |
System.Boolean |
enableVirtualization |
|
Returns
Fields(ListViewFieldSettings)
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 ListViewBuilder Fields(ListViewFieldSettings fields)
Parameters
Returns
Fields(Action<ListViewFieldSettingsBuilder>)
Declaration
public ListViewBuilder Fields(Action<ListViewFieldSettingsBuilder> fields)
Parameters
Returns
GroupTemplate(String)
The ListView has an option to custom design the group header title with the help of groupTemplate
property.
Declaration
public ListViewBuilder GroupTemplate(string groupTemplate)
Parameters
Type |
Name |
Description |
System.String |
groupTemplate |
|
Returns
The ListView has an option to custom design the ListView header title with the help of headerTemplate
property.
Declaration
public ListViewBuilder HeaderTemplate(string headerTemplate)
Parameters
Type |
Name |
Description |
System.String |
headerTemplate |
|
Returns
The headerTitle
is used to set the title of the ListView component.
Declaration
public ListViewBuilder HeaderTitle(string headerTitle)
Parameters
Type |
Name |
Description |
System.String |
headerTitle |
|
Returns
Height(Double)
Defines the height of the ListView component which accepts both string and number values.
Declaration
public ListViewBuilder Height(double height)
Parameters
Type |
Name |
Description |
System.Double |
height |
|
Returns
Height(String)
Defines the height of the ListView component which accepts both string and number values.
Declaration
public ListViewBuilder Height(string height)
Parameters
Type |
Name |
Description |
System.String |
height |
|
Returns
HtmlAttributes(Object)
The htmlAttributes
allows additional attributes such as id, class, etc., and
accepts n number of attributes in a key-value pair format.
Declaration
public ListViewBuilder HtmlAttributes(object htmlAttributes)
Parameters
Type |
Name |
Description |
System.Object |
htmlAttributes |
|
Returns
Locale(String)
Overrides the global culture and localization value for this component. Default global culture is 'en-US'.
Declaration
public ListViewBuilder Locale(string locale)
Parameters
Type |
Name |
Description |
System.String |
locale |
|
Returns
Query(String)
The query
is used to fetch the specific data from dataSource by using where and select keywords.
Declaration
public ListViewBuilder 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 we select the list item in the component.
Declaration
public ListViewBuilder Select(string select)
Parameters
Type |
Name |
Description |
System.String |
select |
|
Returns
ShowCheckBox(Boolean)
If showCheckBox
set to true, which will show or hide the checkbox.
Declaration
public ListViewBuilder ShowCheckBox(bool showCheckBox = true)
Parameters
Type |
Name |
Description |
System.Boolean |
showCheckBox |
|
Returns
If showHeader
set to true, which will show or hide the header of the ListView component.
Declaration
public ListViewBuilder ShowHeader(bool showHeader = true)
Parameters
Type |
Name |
Description |
System.Boolean |
showHeader |
|
Returns
ShowIcon(Boolean)
If showIcon
set to true, which will show or hide the icon of the list item.
Declaration
public ListViewBuilder ShowIcon(bool showIcon = true)
Parameters
Type |
Name |
Description |
System.Boolean |
showIcon |
|
Returns
SortOrder(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 ListViewBuilder SortOrder(SortOrder sortOrder)
Parameters
Returns
Template(String)
The ListView component supports to customize the content of each list items with the help of template
property.
Declaration
public ListViewBuilder Template(string template)
Parameters
Type |
Name |
Description |
System.String |
template |
|
Returns
Width(Double)
Defines the width of the ListView component which accepts both string and number values.
Declaration
public ListViewBuilder Width(double width)
Parameters
Type |
Name |
Description |
System.Double |
width |
|
Returns
Width(String)
Defines the width of the ListView component which accepts both string and number values.
Declaration
public ListViewBuilder Width(string width)
Parameters
Type |
Name |
Description |
System.String |
width |
|
Returns