Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

C# Blazor Grid Filter

$
0
0
<Grid @ref="grid"TItem="ItemViewModel"Class="table table-hover table-bordered table-striped mt-3"AllowSorting="true"AllowFiltering="true"DataProvider="EmployeesDataProvider"\<GridColumns><GridColumn TItem="ItemViewModel" HeaderText="Item Name" PropertyName="ItemName" SortKeySelector="item => item.ItemName">            @context.ItemName</GridColumn><!-- Dinamik Attribute Sütunları -->        @foreach (var attribute in Attributes)        {            string name = attribute.AttributeName;<GridColumn TItem="ItemViewModel" HeaderText="@name" PropertyName="Attributes">                @if (!string.IsNullOrEmpty(context.GetAttributeValue(attribute.AttributeName)))                {                    @context.GetAttributeValue(attribute.AttributeName)                }</GridColumn>        }</GridColumns>public class ItemViewModel{    public string ItemName { get; set; }    public Dictionary<string, string> Attributes { get; set; }    public string GetAttributeValue(string attributeName)    {        if (Attributes.ContainsKey(attributeName))            return Attributes[attributeName];        return string.Empty;    }}

enter image description hereI want to filter items but filter not working how can i solve this problemIm using Blazor.Bootstrap nugethttps://docs.blazorbootstrap.com/getting-started/blazor-webassembly-net-8


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>