【问题标题】:Mudblazor MudDataGrid - Make Filter case insensitiveMudblazor MudDataGrid - 使过滤器不区分大小写
【发布时间】:2022-12-02 18:05:09
【问题描述】:

I have been learning Blazor along with using MudBlazor controls. I really like the MudDataGrid and will be using it in an upcoming project. The one thing the business wants is to be able to search/filter within a grid. The filtering seems to be working great and I have it setup and working

    <MudDataGrid Items=\"@links.Result\" Dense=\"true\" Elevation=\"10\" Filterable=\"true\" FilterMode=\"DataGridFilterMode.ColumnFilterMenu\">
    <Columns>
        @*<Column T=\"LinkForGrid\" Field=\"GroupTitle\" Title=\"Title\" /> The field value is necessary if using sorting.. sorting is on by default  *@
        <Column T=\"LinkForGrid\" Title=\"Product\" Field=\"GroupID\" Filterable=\"false\">
            <CellTemplate>@(context.Item.GroupID)</CellTemplate>
        </Column>
        <Column T=\"LinkForGrid\" Title=\"Link Title\" Field=\"LinkText\">
            <CellTemplate>
                <MudLink Href=\"@context.Item.LinkURL\" target=\"@(context.Item.OpenInNewWindow ? \"_blank\" : \"_self\")\">@context.Item.LinkText</MudLink>
            </CellTemplate>
        </Column>
        @*            <Column T=\"LinkForGrid\" Title=\"Product\" Field=\"GroupTitle\"></Column>*@
        <Column T=\"LinkForGrid\" Title=\"Effective Date\" Field=\"EffectiveDate\" Filterable=\"false\">
            <CellTemplate>@context.Item.EffectiveDate.ToShortDateString()</CellTemplate>
        </Column>

    </Columns>
</MudDataGrid>
The issue I am having is that when you use filtering on a string column as I am, it is case sensitive and I would like it to be case-insensitive. Does anyone know a way to do it with or without custom code? I have looked at the documentation and Googled but have not found anything yet. I know MudBlazor controls are \"new\" and the grid is a work in progress, but this seems to me like a property should be available to change the search type. If anyone has any suggestions, I\'d appreciate it.

Thanks, Jim

    标签: blazor case-insensitive mudblazor


    【解决方案1】:
    【解决方案2】:
    猜你喜欢
    • 2013-08-07
    • 2013-10-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-03-15
    • 2018-07-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多