WebMap for Blazor
  • WebMap Blazor
    • Modernization
      • Overview
      • Modernization Challenges
      • Our solution
      • What is Blazor?
      • How does Blazor Work?
      • Windows Forms in Blazor
      • Deployment
      • Interfacing with hardware devices
    • Research for Blazor
      • Handling Reference Parameters in Async Methods with Ref<T>
      • Alternatives to Async Properties in C#
      • Issue with using "MessageBox.Show" in Blazor
      • File Upload Functionality
      • Async/Await Feature for WebMap Blazor
    • Assessment Tool
    • Conversion Tool
      • Getting Started
      • Modals and Dialogs
      • Static Service Management
      • ImageListStreamer
      • Solution and Project Structure
        • Solution Generator
    • DCP: Desktop Compatibility Library
      • API Documentation
        • Blazor DCP: Gap.Blazor.Application Class Reference
      • Components Information
        • Button Component
        • Application Data Component
        • GroupBox Component
        • Label Component
        • CheckBox
        • CheckedListBox
        • ComboBox
        • DateTimePicker
        • Form
        • ListBox
        • ListView
          • WMListViewDetails
        • Mdi Container Component
        • MenuStrip
        • MessageBox
        • MonthCalendar
        • Panel
        • PictureBox
        • ProgressBar
        • RadioButton
        • StatusStrip
        • ToolStripStatusLabel
        • TabControl
        • TabPage
        • TextBox
        • ToolStrip
          • ToolStripButton
          • ToolStripLabel
          • ToolStripSeparator
        • ToolTip
    • Post Conversion
      • How To?
        • Create a new WebMap Window?
        • Create a new WebMap Component?
        • Create a native Blazor Window in a WebMap app?
        • Create a native Blazor Component in a WebMap Window?
        • Change the default WebMap visual layout?
    • WebMap: Angular vs Blazor
      • Footprint
      • Binaries size
      • Chatiness
      • Performance
      • Extensibility
      • Maintainability
      • Debugging
      • Project Structure
    • WebMap for Blazor Release Notes
      • Beta version
    • FAQ
    • Errors and Troubleshooting
    • License
Powered by GitBook
On this page
  • Description
  • Usage
  • Properties
  • Methods
  • Dynamic Rendering
  • Events
Export as PDF
  1. WebMap Blazor
  2. DCP: Desktop Compatibility Library
  3. Components Information

ListView

Description

This component represents a list view in Blazor using the Gap.Blazor.ListView model. It supports multiple view modes, including a detailed view rendered through a dedicated WMListViewDetails component. The component is designed to handle dynamic data and column configurations, with full support for selection and check state tracking.

Usage

@using System.Collections.ObjectModel
@using Gap.Blazor
@using Gap.Blazor.Components
@using System.Dynamic
@namespace Gap.Blazor.Components

@if (@listViewModel.View == ListViewMode.Details)
{
    <WMListViewDetails model="@listViewModel"></WMListViewDetails>
}

Properties

  • listViewModel: Instance of the Gap.Blazor.ListView model.

  • items: An observable collection of ExpandoObject used to represent dynamic data rows.

  • telerikGrid: Reference to a Telerik Grid component (used internally in detailed views).

  • DataAdapter: Instance of ListViewDataAdapter used to adapt the model’s data for rendering.

Methods

  • OnInitialized(): Initializes the data adapter and subscribes to model events:

    • Columns.ColumnHeaderAdded

    • Columns.ColumnHeaderRemoved

    • SelectedItems.AfterClear, AfterAdd

    • SelectedIndices.AfterClear, AfterAdd

    • CheckedIndices.AfterAdd, AfterRemove

  • OnParametersSetAsync(): Placeholder for handling parameter updates (currently no logic).

  • Columns(): Returns the ColumnHeaderCollection from the model.

Dynamic Rendering

The component conditionally renders the detailed view using:

  • WMListViewDetails: A specialized component for rendering the Details view mode.

  • View Mode Check: Only renders if listViewModel.View == ListViewMode.Details.

Events

  • ColumnHeaderAdded / Removed

  • SelectedItems / SelectedIndices / CheckedIndices: Add and clear events

  • NotifyModelChanged: Triggered indirectly via event subscriptions

PreviousListBoxNextWMListViewDetails

Last updated 2 days ago