menu

ASP.NET Core - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ListViewBuilder - API Reference

    Show / Hide Table of Contents

    Class ListViewBuilder

    Inheritance
    System.Object
    ControlBuilder
    ListViewBuilder
    Inherited Members
    ControlBuilder.Context
    Namespace: Syncfusion.EJ2.Lists
    Assembly: Syncfusion.EJ2.dll
    Syntax
    public class ListViewBuilder : ControlBuilder

    Constructors

    ListViewBuilder()

    Declaration
    public ListViewBuilder()

    ListViewBuilder(ListView)

    Declaration
    public ListViewBuilder(ListView model)
    Parameters
    Type Name Description
    ListView model

    Fields

    model

    Declaration
    public ListView model
    Field Value
    Type Description
    ListView

    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 when every ListView action starts.

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

    ActionComplete(String)

    Triggers when every ListView actions completed.

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

    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
    Type Description
    ListViewBuilder

    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
    Type Description
    ListViewBuilder

    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
    Type Name Description
    CheckBoxPosition checkBoxPosition
    Returns
    Type Description
    ListViewBuilder

    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
    Type Description
    ListViewBuilder

    DataSource(Action<DataManagerBuilder>)

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

    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
    Type Description
    ListViewBuilder

    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
    Type Description
    ListViewBuilder

    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
    Type Description
    ListViewBuilder

    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
    Type Description
    ListViewBuilder

    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
    Type Description
    ListViewBuilder

    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
    Type Description
    ListViewBuilder

    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
    Type Description
    ListViewBuilder

    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
    Type Description
    ListViewBuilder

    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
    Type Name Description
    ListViewFieldSettings fields
    Returns
    Type Description
    ListViewBuilder

    Fields(Action<ListViewFieldSettingsBuilder>)

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

    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
    Type Description
    ListViewBuilder

    HeaderTemplate(String)

    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
    Type Description
    ListViewBuilder

    HeaderTitle(String)

    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
    Type Description
    ListViewBuilder

    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
    Type Description
    ListViewBuilder

    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
    Type Description
    ListViewBuilder

    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
    Type Description
    ListViewBuilder

    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
    Type Description
    ListViewBuilder

    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
    Type Description
    ListViewBuilder

    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
    Type Description
    ListViewBuilder

    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
    Type Description
    ListViewBuilder

    ShowHeader(Boolean)

    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
    Type Description
    ListViewBuilder

    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
    Type Description
    ListViewBuilder

    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
    Type Name Description
    SortOrder sortOrder
    Returns
    Type Description
    ListViewBuilder

    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
    Type Description
    ListViewBuilder

    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
    Type Description
    ListViewBuilder

    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
    Type Description
    ListViewBuilder
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved