Class ListView
The ListView widget builds interactive ListView interface. This control allows you to select an item from a list-like interface and display a set of data items in different layouts or views
Inheritance
System.Object
ListView
Implements
System.Web.UI.INamingContainer
System.Web.UI.IPostBackEventHandler
System.Web.UI.IPostBackDataHandler
System.Web.UI.IUrlResolutionService
Assembly: Syncfusion.EJ.Web.dll
Syntax
public class ListView : CommonDataBoundControl, INamingContainer, IPostBackEventHandler, IPostBackDataHandler, IUrlResolutionService
Constructors
ListView()
Declaration
Properties
AdjustFixedPosition
Specifies whether to Adjust FixedPosition.
Declaration
public bool AdjustFixedPosition { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
AjaxSettings
Specifies the AjaxSettings.
Declaration
public jQueryAjaxOptions AjaxSettings { get; set; }
Property Value
Specifies whether to allow scrolling behaviour for the contents
Declaration
public bool AllowScrolling { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Specifies whether to enable virtual Scrolling for the listview.
Declaration
public bool AllowVirtualScrolling { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
AutoAdjustHeight
Specifies whether to set the height as window height automatically
Declaration
public bool AutoAdjustHeight { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Specifies when the content height exceeds the page it automatically enabled.
Declaration
public bool AutoAdjustScrollHeight { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
CheckDomChanges
Specifies whether need to refresh scrollpanel rendered in the control when elements are added dynamically.
Declaration
public bool CheckDomChanges { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
CheckedIndices
Contains the list of checked items index.
Declaration
public List<int> CheckedIndices { get; set; }
Property Value
Type |
Description |
System.Collections.Generic.List<System.Int32> |
|
ClientSideOnAjaxBeforeLoad
Event triggers before the ajax request happens.
Declaration
public string ClientSideOnAjaxBeforeLoad { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnAjaxComplete
Event triggers after the ajax content loaded completely.
Declaration
public string ClientSideOnAjaxComplete { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnAjaxError
Event triggers when the ajax request failed.
Declaration
public string ClientSideOnAjaxError { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnAjaxSuccess
Event triggers after the ajax content loaded successfully.
Declaration
public string ClientSideOnAjaxSuccess { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnCreate
Occurs before a ListView item Create.
Declaration
public string ClientSideOnCreate { get; set; }
Property Value
Type |
Description |
System.String |
The client side on create.
|
ClientSideOnDestroy
Occurs when a ListView control destroyed.
Declaration
public string ClientSideOnDestroy { get; set; }
Property Value
Type |
Description |
System.String |
The client side on destroy.
|
Event triggers when touch end happens on the back button in the header.
Declaration
public string ClientSideOnHeaderBackButtonTap { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnLoad
Event triggers before the items loaded.
Declaration
public string ClientSideOnLoad { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnLoadComplete
Event triggers after the items loaded.
Declaration
public string ClientSideOnLoadComplete { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnMouseDown
Event triggers when mouse down happens on the item.
Declaration
public string ClientSideOnMouseDown { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnMouseUp
Event triggers when mouse up happens on the item.
Declaration
public string ClientSideOnMouseUp { get; set; }
Property Value
Type |
Description |
System.String |
|
ClientSideOnReady
Event triggers when ready happens on the item.
Declaration
public string ClientSideOnReady { get; set; }
Property Value
Type |
Description |
System.String |
|
DataAttributesField
Mapping Field for Attributes property
Declaration
public string DataAttributesField { get; set; }
Property Value
Type |
Description |
System.String |
|
DataBindings
The data bindings for items.
Declaration
public List<ListViewBinding> DataBindings { get; }
Property Value
DataCheckedField
Mapping Field for Checked property
Declaration
public string DataCheckedField { get; set; }
Property Value
Type |
Description |
System.String |
|
Mapping Field for ChildHeaderBackButtonText property
Declaration
public string DataChildHeaderBackButtonTextField { get; set; }
Property Value
Type |
Description |
System.String |
|
Mapping Field for ChildHeaderTitle property
Declaration
public string DataChildHeaderTitleField { get; set; }
Property Value
Type |
Description |
System.String |
|
DataEnableAjaxField
Mapping Field for EnableAjax property
Declaration
public string DataEnableAjaxField { get; set; }
Property Value
Type |
Description |
System.String |
|
DataEnableCheckMarkField
Mapping Field for EnableCheckMark property
Declaration
public string DataEnableCheckMarkField { get; set; }
Property Value
Type |
Description |
System.String |
|
DataHrefField
Mapping Field for Href property
Declaration
public string DataHrefField { get; set; }
Property Value
Type |
Description |
System.String |
|
DataIdField
Mapping Field for Id property
Declaration
public string DataIdField { get; set; }
Property Value
Type |
Description |
System.String |
|
DataImageClassField
Mapping Field for ImageClass property
Declaration
public string DataImageClassField { get; set; }
Property Value
Type |
Description |
System.String |
|
DataImageUrlField
Mapping Field for ImageUrl property
Declaration
public string DataImageUrlField { get; set; }
Property Value
Type |
Description |
System.String |
|
DataManager
Data Manager as Inner property, which help us to bind the data sources from data adaptors
Declaration
public DataSource DataManager { get; set; }
Property Value
DataNavigateUrlField
Mapping Field for NavigateUrl property
Declaration
public string DataNavigateUrlField { get; set; }
Property Value
Type |
Description |
System.String |
|
DataParentPrimaryKeyField
Mapping Field for ParentPrimaryKey property
Declaration
public string DataParentPrimaryKeyField { get; set; }
Property Value
Type |
Description |
System.String |
|
DataPersistSelectionField
Mapping Field for PersistSelection property
Declaration
public string DataPersistSelectionField { get; set; }
Property Value
Type |
Description |
System.String |
|
DataPreventSelectionField
Mapping Field for PreventSelection property.
Declaration
public string DataPreventSelectionField { get; set; }
Property Value
Type |
Description |
System.String |
|
DataPrimaryKeyField
Mapping Field for PrimaryKey property
Declaration
public string DataPrimaryKeyField { get; set; }
Property Value
Type |
Description |
System.String |
|
DataRenderTemplateField
Mapping Field for RenderTemplate property.
Declaration
public string DataRenderTemplateField { get; set; }
Property Value
Type |
Description |
System.String |
|
DataSource
Contains the list of data for generating the ListView items.
Declaration
public object DataSource { get; set; }
Property Value
Type |
Description |
System.Object |
|
DataSourceCachingMode
Gets or sets the DataSource Caching Mode.
Declaration
public DataSourceCachingMode DataSourceCachingMode { get; set; }
Property Value
DataTemplateIdField
Mapping Field for TemplateId property
Declaration
public string DataTemplateIdField { get; set; }
Property Value
Type |
Description |
System.String |
|
DataTextField
Mapping Field for Text property
Declaration
public string DataTextField { get; set; }
Property Value
Type |
Description |
System.String |
|
DataTouchEndField
Mapping Field for TouchEnd property
Declaration
public string DataTouchEndField { get; set; }
Property Value
Type |
Description |
System.String |
|
DataTouchStartField
Mapping Field for TouchStart property.
Declaration
public string DataTouchStartField { get; set; }
Property Value
Type |
Description |
System.String |
|
EmptyDataText
Shows the message when the list item doesnot contains any text/data.
Declaration
public string EmptyDataText { get; set; }
Property Value
Type |
Description |
System.String |
|
EnableAjax
Specifies whether to load AJAX content while selecting item.
Declaration
public bool EnableAjax { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
EnableCache
Specifies whether to enable caching the content
Declaration
public bool EnableCache { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
EnableCheckMark
Specifies whether to enable check mark for the item.
Declaration
public bool EnableCheckMark { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
EnableFiltering
Specifies whether to enable the filtering feature to filter the item.
Declaration
public bool EnableFiltering { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
EnableGroupList
Specifies whether to group the list item.
Declaration
public bool EnableGroupList { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
EnablePersistence
Specifies to maintain the current model value to browser cookies for state maintenance. While refresh the page, the model value will get apply to the control from browser cookies.
Declaration
public bool EnablePersistence { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Fields
Map the fields for the list items
Declaration
public ListViewFields Fields { get; }
Property Value
GroupItems
Collection of top-level items.
Declaration
public List<ListViewGroupItems> GroupItems { get; }
Property Value
Specifies the Header backbutton text.
Declaration
public string HeaderBackButtonText { get; set; }
Property Value
Type |
Description |
System.String |
|
Specifies the title of the header.
Declaration
public string HeaderTitle { get; set; }
Property Value
Type |
Description |
System.String |
|
Height
Declaration
public int? Height { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Int32> |
|
Specifies whether to hide the header for unsupported device
Declaration
public bool HideHeaderForUnsupportedDevice { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
ItemRequestCount
Specifies the itemRequestCount.
Declaration
public int ItemRequestCount { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Items
Collection of top-level items.
Declaration
public List<ListViewItems> Items { get; }
Property Value
Locale
Defines the localization culture for the ListView
Declaration
public string Locale { get; set; }
Property Value
Type |
Description |
System.String |
|
Model
Specifies the Collection of ListViewProperties.
Declaration
public ListViewProperties Model { get; set; }
Property Value
PersistSelection
Specifies whether to retain the selection of the item.
Declaration
public bool PersistSelection { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
PreventSelection
Specifies whether to prevent the selection of the item.
Declaration
public bool PreventSelection { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Query
Specifies the query to retrieve the data from server
Declaration
public string Query { get; set; }
Property Value
Type |
Description |
System.String |
|
RenderTemplate
Specifies whether need to render the control with the template contents.
Declaration
public bool RenderTemplate { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
SelectedItemIndex
Specifies the index of item which need to be in selected state initially while loading.
Declaration
public int SelectedItemIndex { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
Specifies whether to show the header.
Declaration
public bool ShowHeader { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Specifies whether to show the header back button.
Declaration
public bool ShowHeaderBackButton { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Specifies whether need to show the scroll bars when scrolling is allowed.
Declaration
public bool ShowScrollbars { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
TemplateId
Specifies ID of the element contains template contents.
Declaration
public string TemplateId { get; set; }
Property Value
Type |
Description |
System.String |
|
TotalItemsCount
Specifies the totalItemsCount.
Declaration
public int? TotalItemsCount { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Int32> |
|
Transition
Specifies the transition effect while navigation happens.
Declaration
public string Transition { get; set; }
Property Value
Type |
Description |
System.String |
|
Specifies virtual Scroll mode for the listview.
Declaration
public VirtualScrollMode VirtualScrollMode { get; set; }
Property Value
Width
Declaration
public int? Width { get; set; }
Property Value
Type |
Description |
System.Nullable<System.Int32> |
|
Methods
DataBind(IEnumerable, DataSourceView)
Declaration
public bool DataBind(IEnumerable dataSource, DataSourceView dsView)
Parameters
Type |
Name |
Description |
System.Collections.IEnumerable |
dataSource |
|
System.Web.UI.DataSourceView |
dsView |
|
Returns
Type |
Description |
System.Boolean |
|
DependentScripts()
Get the dependent files for ListView control
Declaration
public List<string> DependentScripts()
Returns
Type |
Description |
System.Collections.Generic.List<System.String> |
|
FetchData(IEnumerable)
Declaration
public override void FetchData(IEnumerable data)
Parameters
Type |
Name |
Description |
System.Collections.IEnumerable |
data |
|
Overrides
GetDefaultDataBinding(Object)
Declaration
public ListViewBinding GetDefaultDataBinding(object item)
Parameters
Type |
Name |
Description |
System.Object |
item |
|
Returns
GetDependentFiles()
Get the dependent files for ListView control
Declaration
public override List<string> GetDependentFiles()
Returns
Type |
Description |
System.Collections.Generic.List<System.String> |
|
Overrides
GetFieldPropertyValue(String, PropertyDescriptorCollection, Object)
Declaration
protected string GetFieldPropertyValue(string sAttrName, PropertyDescriptorCollection propCollection, object oEnumerableItem)
Parameters
Type |
Name |
Description |
System.String |
sAttrName |
|
System.ComponentModel.PropertyDescriptorCollection |
propCollection |
|
System.Object |
oEnumerableItem |
|
Returns
Type |
Description |
System.String |
|
LoadViewState(Object)
Restores view-state information from a previous page request.
Declaration
protected override void LoadViewState(object state)
Parameters
Type |
Name |
Description |
System.Object |
state |
|
Overrides
PostBackEventHandler(String, Dictionary<String, Object>)
Gets a value that indicates whether the page is being loaded in response to a postback.
Declaration
public override void PostBackEventHandler(string eventName, Dictionary<string, object> args)
Parameters
Type |
Name |
Description |
System.String |
eventName |
|
System.Collections.Generic.Dictionary<System.String, System.Object> |
args |
|
Overrides
Render()
Declaration
Returns
Type |
Description |
System.String |
|
Render(HtmlTextWriter)
Declaration
protected override void Render(HtmlTextWriter writer)
Parameters
Type |
Name |
Description |
System.Web.UI.HtmlTextWriter |
writer |
|
Overrides
SaveViewState()
Saves any server control view-state changes that have occurred since the time the page was posted back to the server.
Declaration
protected override object SaveViewState()
Returns
Type |
Description |
System.Object |
|
SetupItemBindingData(ListViewItems, ListViewBinding, Object)
Declaration
public virtual void SetupItemBindingData(ListViewItems listViewItem, ListViewBinding listViewBinding, object oEnumerableItem)
Parameters
ShouldSerializeDataSource()
Specifies the ShouldSerializeDataSource
Declaration
public bool ShouldSerializeDataSource()
Returns
Type |
Description |
System.Boolean |
|
ShouldSerializeFields()
Specifies the ShouldSerializeFields.
Declaration
public bool ShouldSerializeFields()
Returns
Type |
Description |
System.Boolean |
|
UpdateServerModel(Dictionary<String, Object>)
Maintaining viewstate model values on post back
Declaration
public override void UpdateServerModel(Dictionary<string, object> clientModel)
Parameters
Type |
Name |
Description |
System.Collections.Generic.Dictionary<System.String, System.Object> |
clientModel |
|
Overrides
Events
MouseDown
Triggered when the ListView item is clicked.
Declaration
public event ListView.ListViewEventHandler MouseDown
Event Type
Implements
System.Web.UI.INamingContainer
System.Web.UI.IPostBackEventHandler
System.Web.UI.IPostBackDataHandler
System.Web.UI.IUrlResolutionService