I have a SfGrid that has filtering & sorting enabled for my columns. When I click on the default filter icon that shows in the column header, it will also trigger the sort event. See the video attached in zip file.
I was unable to find demos of columns that have both filtering & sorting applied. So I am unsure what the expected functionality is here. But, from a user perspective I believe this should not be happening. I should be able to click the filter icon to show the filter popup; and if i click any other area of the header it would sort the values in the column. It appears that both the filter icon and the column header are using the same clickable space.
My data source is a
List<ExpandoObject> populated from a view model.
I am trying to determine if this is a bug with my code, or the syncfusion control(s). I am using version 19.1.0.59 of the blazor syncfusion nuget package.
My grid code looks like the following:
var toolbarItems = new List<string>
{
"ColumnChooser"
};
<SfGrid @ref="dataGrid"
ID="Grid"
GridLines="GridLine.Both"
DataSource="@ViewModel.Data"
ShowColumnChooser="true"
AllowGrouping="true"
AllowSorting="true"
AllowMultiSorting="false"
AllowPaging="true"
AllowReordering="true"
AllowFiltering="true"
Toolbar="@toolbarItems"
Width="1270">
<GridFilterSettings Type="Syncfusion.Blazor.Grids.FilterType.CheckBox"></GridFilterSettings>
<GridPageSettings PageSizes="new int[] { 10, 15, 20, 25, 50, 75, 100, 250 }" PageSize="50" />
<GridColumns>
@foreach (var field in ViewModel.Fields)
{
if (!Enum.TryParse(field.DataType, out ColumnType columnType))
columnType = ColumnType.String;
<GridColumn IsPrimaryKey="@field.PrimaryKey"
AllowSearching="true"
ShowInColumnChooser="@field.Show"
Visible="@field.Show"
HeaderText="@field.DisplayName"
Type="@columnType"
AutoFit="true"
MinWidth="120"
Format="@field.Format"
Field="@field.Key" />
}
</GridColumns>
</SfGrid>
Attachment:
Syncfusion_Grid,_Sort__Filter_Issue.mp4_d5134015.zip