mcpField
S
syncfusion-aspnetcore-listview

syncfusion-aspnetcore-listview

github.com/syncfusionDevelopment099 installsUpdated 3w ago
Repository

About syncfusion-aspnetcore-listview

A skill for ASP.NET Core developers using Syncfusion ListView to build interactive grouped or hierarchical lists. It covers local and remote data, templates, selection, virtualization, and keyboard accessibility.

Key features

  1. 01Bind local or remote data
  2. 02Group items and create nested lists
  3. 03Customize items with templates
  4. 04Support checkboxes and multi-selection
  5. 05Virtualize large lists and enable keyboard navigation

Use cases

  1. 01Browse and select categorized products
  2. 02Build hierarchical file navigation
  3. 03Create task lists with status checkboxes
  4. 04Virtualize large news or log feeds

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/syncfusion/aspnetcore-ui-components-skills --skill syncfusion-aspnetcore-listview

After installing, type/syncfusion-aspnetcore-listviewin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/
accessibility-keyboard-aria.md
advanced-features-persistence.md
api-reference.md
checkboxes-selection-events.md
events-and-error-handling.md
field-settings-and-configuration.md
getting-started-and-data-binding.md
grouping-nested-lists-virtualization.md
sorting-filtering-scrolling.md
styling-appearance-properties.md
templates-and-customization.md

Details

From the project README

Implementing ListView in ASP.NET Core

The ListView component is a powerful, feature-rich control that displays data in interactive hierarchical structures. It supports data binding (local and remote), grouping, nested lists, custom templates, virtualization for performance, and comprehensive keyboard accessibility.

When to Use This Skill

Use this skill when you need to:

  • Display Interactive Lists: Render data collections with click selection, hover effects, and visual feedback
  • Group Related Items: Organize list items into categories using the groupBy field
  • Support Nested Navigation: Create multi-level hierarchies with parent-child relationships
  • Optimize Performance: Handle large datasets (1000+ items) with UI virtualization
  • Customize Appearance: Apply templates for headers, items, and group titles
  • Enable Selection: Implement single or multi-select with checkboxes
  • Handle Remote Data: Bind to server APIs with DataManager and Query
  • Implement Keyboard Access: Support keyboard navigation for accessibility

Component Overview

The ListView component in Syncfusion EJ2 for ASP.NET Core uses TagHelper syntax and exposes core properties:

CategoryKey Properties
Data BindingdataSource, fields, query
Display Controltemplate, headerTemplate, groupTemplate
User InteractionshowCheckBox, checkBoxPosition, sortOrder
PerformanceenableVirtualization, height
AppearancecssClass, width, showHeader, showIcon
AccessibilityenableRtl, event handlers

Documentation and Navigation Guide

Getting Started & Data Binding

📄 Read: references/getting-started-and-data-binding.md

  • ASP.NET Core project setup and TagHelper import
  • DataSource property variations (array, JSON, remote)
  • Field mapping for text, id, and nested properties
  • Remote data binding with DataManager and Query
  • Basic ListView initialization examples
Field Settings & Configuration

📄 Read: references/field-settings-and-configuration.md

  • Complete field mapping options (14 properties)
  • iconCss for dynamic icon customization
  • enabled, isVisible, isChecked state properties
  • groupBy for categorization logic
  • child property for nested list support
  • Validation patterns and edge cases
Grouping, Nested Lists & Virtualization

📄 Read: references/grouping-nested-lists-virtualization.md

  • Grouping items by category with groupTemplate
  • Nested list navigation structure
  • enableVirtualization for large datasets
  • Window scroll vs container scroll modes
  • Conditional rendering in templates
  • Performance optimization strategies
Templates & Customization

📄 Read: references/templates-and-customization.md

  • template property for item customization
  • headerTemplate and groupTemplate
  • Built-in CSS classes (e-list-wrapper, e-list-avatar, e-list-badge, etc.)
  • Avatar and multi-line list patterns
  • Custom HTML markup in templates
Checkboxes, Selection & Events

📄 Read: references/checkboxes-selection-events.md

  • showCheckBox property and positioning (Left/Right)
  • select event with SelectEventArgs
  • Multi-item selection patterns
  • Checked state management
  • Selection event handling
Styling & Appearance

📄 Read: references/styling-appearance-properties.md

  • cssClass for custom styling
  • height and width control
  • showHeader and showIcon properties
  • CSS selector reference for styling
  • Hover and focus state customization
Events & Error Handling

📄 Read: references/events-and-error-handling.md

  • select, scroll, actionBegin, actionComplete events
  • Event binding in TagHelper
  • Remote data failure scenarios
  • Error handling strategies
Sorting, Filtering & Scrolling

📄 Read: references/sorting-filtering-scrolling.md

  • sortOrder property (Ascending, Descending)
  • sortBy field mapping
  • scroll event for dynamic loading
  • Infinite scroll patterns
  • Filter operations
Accessibility & Keyboard Navigation

📄 Read: references/accessibility-keyboard-aria.md

  • Keyboard shortcuts (Arrow Up/Down, Select, Back)
  • ARIA attributes (aria-selected, aria-level)
  • enableRtl for right-to-left support
  • Screen reader compatibility
  • Best practices for inclusive design
Advanced Features & Persistence

📄 Read: references/advanced-features-persistence.md

  • enablePersistence for state retention
  • animation property with AnimationSettings
  • locale for localization
  • disableHtmlEncode and enableHtmlSanitizer
  • RTL and cultural adaptations
API Reference

📄 Read: references/api-reference.md

  • Complete ListView properties (30+ properties documented)
  • Events reference (select, scroll, actionBegin, actionComplete, actionFailure)
  • Field mapping API with type signatures
  • Enumerations (SortOrder, AnimationEffect, etc.)
  • Method signatures for programmatic control
  • Event argument types and properties

Quick Start Example

Basic ASP.NET Core ListView with TagHelper:

@{
    ViewData["Title"] = "ListView Example";
    List<ListItem> dataSource = new List<ListItem>()
    {
        new ListItem { id = "1", text = "Artwork" },
        new ListItem { id = "2", text = "Abstract" },
        new ListItem { id = "3", text = "Modern Painting" },
        new ListItem { id = "4", text = "Ceramics" }
    };
}

<ejs-listview id="list" dataSource="dataSource" 
    showHeader="true" headerTitle="Art Gallery">
</ejs-listview>

@code {
    public class ListItem
    {
        public string id { get; set; }
        public string text { get; set; }
    }
}

With Selection & Checkbox:

<ejs-listview id="list" dataSource="dataSource" 
    showCheckBox="true" checkBoxPosition="Right">
</ejs-listview>

With Grouping:

<ejs-listview id="list" dataSource="dataSource">
    <e-listview-fieldsettings text="text" groupBy="category" id="id"></e-listview-fieldsettings>
</ejs-listview>

Common Patterns

Pattern 1: Simple Data List

Use dataSource with array of strings or objects; map fields.text for display.

Pattern 2: Categorized Groups

Set fields.groupBy to organize items under category headers automatically.

Pattern 3: Nested Hierarchies

Map fields.child to enable drill-down navigation through parent-child relationships.

Pattern 4: Large Dataset Optimization

Enable enableVirtualization="true" to render only visible items; improves performance 10x+.

Pattern 5: Custom Item Display

Use template property with <div class="e-list-wrapper"> for rich formatting (avatars, badges, multi-line text).

Pattern 6: Remote Data Integration

Use dataSource with DataManager; set query to filter/sort server-side; bind fields to match API response.

Key Field Mappings Reference

The fields property controls data extraction. Common mappings:

Field PropertyPurposeExample
textDisplay text for itemtext="productName"
idUnique identifierid="productId"
groupByCategory/group fieldgroupBy="category"
childNested list datachild="subcategories"
iconCssIcon classiconCss="iconClass"
enabledEnable/disable stateenabled="isActive"
isCheckedCheckbox stateisChecked="isSelected"
isVisibleVisibility stateisVisible="isVisible"
tooltipHover tooltip texttooltip="description"
sortBySort fieldsortBy="name"
htmlAttributesCustom attributeshtmlAttributes="attributes"

Common Use Cases

Use Case 1: Product Category Browser

Group products by category; enable selection for shopping cart addition.

Use Case 2: File/Folder Navigation

Use nested lists with icons for file explorer interface.

Use Case 3: Task Management List

Combine checkboxes with templates for todo/task display and status tracking.

Use Case 4: Contact Directory

Sort alphabetically; template with avatars and contact info; filter by category.

Use Case 5: Large Data Feed (News, Logs)

Enable virtualization; implement scroll event for dynamic loading; optimize rendering.


Next Steps:

Comments

Markdown supported