FlexGrid Row Details for Blazor

FlexGrid Row Details for Blazor

In this article, we will introduce the RowDetails feature in FlexGrid for Blazor. FlexGrid provides the flexibility to show additional information about each row using FlexGridDetailProvider class which provides a custom template to set the row details. You can add details section to any row in FlexGrid, which enables you to group data in a template that will be visible optionally.

FlexGrid for Blazor can show tabular data in an Excel-like grid. It supports many features for displaying information effectively. One feature is RowDetails; this provides flexibility when demonstrating additional data on each record in a detail section using a custom template. This template can contain any HTML or a Blazor control.

In this article, we will discuss two ways to display additional information using RowDetails inside FlexGrid.

How to Use HTML in RowDetails

Step 1: Create the Blazor Web Assembly Project

Create a Blazor Web Assembly project in VS2019.

Step 2: Adding Style Resource Entries

Open Index.html from under wwwroot and add the following style resource entries within the head tag:

<link rel="stylesheet" href="~/_content/C1.Blazor.Core/styles.css" />  
    <link rel="stylesheet" href="~/_content/C1.Blazor.Grid/styles.css" />  
    <link rel="stylesheet" href="~/_content/C1.Blazor.ListView/styles.css" 
/>  
    <link rel="stylesheet" href="~/_content/C1.Blazor.Input/styles.css" />  
    <link rel="stylesheet" href="~/_content/C1.Blazor.DataPager/styles.css" 
/>

Add the following scripts within body tags:

    <script src="~/_content/C1.Blazor.Core/scripts.js"></script>  
    <script src="~/_content/C1.Blazor.Input/scripts.js"></script>  
    <script src="~/_content/C1.Blazor.Grid/scripts.js"></script>
Step 3: Adding FlexGrid

Suppose we have a Customer class with Id, FirstName, LastName, Country, City, Address, and PostalCode public properties. We wish to show Country, City, Address, and PostalCode inside each row's detail section. To configure the grid to display such data, open the Index. razor page and clear all code except the top @page directive. Let's add a FlexGrid control and configure it to show Id, FirstName, and LastName.

<FlexGrid IsReadOnly="true" AutoGenerateColumns="false" HeadersVisibility="GridHeadersVisibility.All" ItemsSource="customers" Style="@("max-height:50vh")">  
    <FlexGridColumns>  
        <GridColumn Binding="Id" Width="80" />  
        <GridColumn Binding="FirstName" Width="GridLength.Star" />  
        <GridColumn Binding="LastName" Width="GridLength.Star" />  
    </FlexGridColumns>  
</FlexGrid>

.net desktop web

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

jQuery Ajax CRUD in ASP.NET Core MVC with Modal Popup

In this article, we’ll discuss how to use jQuery Ajax for ASP.NET Core MVC CRUD Operations using Bootstrap Modal. With jQuery Ajax, we can make HTTP request to controller action methods without reloading the entire page, like a single page application.

Blazor for ASP.NET Web Forms Developers PDF

In this blog post, I will share the Free e-book: Blazor for ASP.NET Web Forms Developers PDF. This book is great for ASP.NET Web Forms developers looking for guidelines. As well as strategies for migrating their existing apps to a modern, open-source, and cross-platform web framework.

8 Reasons Why PHP and .NET Rule the World of Web Development

Building a website is the first step in the path of a successful business. For web development, PHP and .Net are the foremost languages. If any company wants to succeed in the market, it needs to strengthen its digital presence. Though social media provides a place to gain some attention, it is impossible to create a brand without an official web page. This is why businesses hire firms offering web development services to get their website designed, which would enable them to get as much traction as possible.

The ASP.NET Web API 2 HTTP Message Lifecycle in 43 Easy Steps

Anyone who works with ASP.NET Web API should check out this poster that Microsoft created to explain the Request/Response Pipeline that Web API utilizes. It's amazing, and if you do any work in Web API you should check it out! Right now. Yes, seriously. Go ahead, I'll wait.

whatsapp web-w app web-webs whatsapp »

whatsapp web-w app web-webs whatsapp-web.whatsapp.com-wsp web-web.whatsapp.com qr-whats up online-whatsappwebsite