SfDataGrid Horizontal Scrolling Performance Issues

We're experiencing significant performance issues with vertical scrolling in SfDataGrid. The scrolling is noticeably laggy and unresponsive especially with android

Attempted Optimizations

We've already tried the following approaches with limited success:

  • Setting fixed row heights
  • Setting EnableVirtualization = true

12 Replies 1 reply marked as answer

RM RiyasHameed MohamedAbdulKhader Syncfusion Team April 21, 2025 11:27 AM UTC

Hi Nguyen Thinh,

We have reviewed your reported query and would like to inform you that you can use the LoadUIView property to improve scrolling performance. This property determines whether to load a UIElement or to draw the cell content directly within the DataGridCell.

For more information, please refer to the UG documentation link below:

https://help.syncfusion.com/maui/datagrid/performance?cs-save-lang=1&cs-lang=xaml#loaduiview

Note: This property is not supported for DataGridTemplateColumn and DataGridCheckBoxColumn.

Additionally, we have attached a simple sample for your reference.

We hope this helps! Please let us know if you have any further questions or if there is anything else we can assist you with.

Regards,
Riyas Hameed M



NT Nguy?n Th?nh replied to RiyasHameed MohamedAbdulKhader April 21, 2025 02:13 PM UTC

unfortunely my code rely heavily on DataGridTemplateColumn
Here is my sample code, hope you can help me.

public virtual SfDataGrid InitGridView()
{
var gridView = new SfDataGrid
{

AllowLoadMore = false,
AutoGenerateColumnsMode = AutoGenerateColumnsMode.None,
AllowResizingColumns = true,
// ResizingMode = ResizingMode.OnTouchUp,
ColumnWidthMode = ColumnWidthMode.Fill,
// ScrollingMode = ScrollingMode.Pixel,
// VerticalOverScrollMode = VerticalOverScrollMode.None,
DefaultStyle = new FGridSettings(),
// AllowDiagonalScrolling = false,
HeaderGridLinesVisibility = GridLinesVisibility.Both,
GridLinesVisibility = GridLinesVisibility.Both,
MinimumHeightRequest = 50,
MinimumWidthRequest = 100,
EnableDataVirtualization = true,
RowHeight = FSetting.HeightRowGrid,
HeaderRowHeight = FSetting.HeightRowGrid - 5,
SelectionMode = DataGridSelectionMode.SingleDeselect,
};
return gridView;
}
public class FGridTemplateColumn : DataGridTemplateColumn
{
public FGridTemplateColumn()
{
LoadUIView = true;
MinimumWidth = 40;
ColumnWidthMode = ColumnWidthMode.None;
// CellTextSize = FSetting.FontSizeLabelContent;
CellTextAlignment = TextAlignment.Center;
}
}
public virtual DataGridColumn GridColumnView(SfDataGrid origin, List<FField> detail, FField field, bool isAutosize)
{
var title = field.Title;
var format = field.DataFormatString;

DataGridColumn columns = field.FieldType switch
{
FieldType.Bool => new FCheckBoxColumn(origin, title),
FieldType.DateTime => new FDateColumn(origin, title),
FieldType.Number or FieldType.NumberString => new FNumericColumn(origin, title),
_ => isAutosize ? new FTextAutoColumn(origin, title) : new FTextColumn(origin, title)
};
columns.Width = field.Width;
columns.MappingName = FData.GetBindingName(field.Name);
columns.CellTextAlignment = field.Align;
// columns.CellTextAlignment = TextAlignment.Center;
columns.AllowEditing = field.IsReadOnly;

if (!string.IsNullOrWhiteSpace(format))
{
if (FFunc.IsBinding(format)) columns.SetBinding(DataGridColumn.FormatProperty, "Details." + FData.GetBindingName(FFunc.ReplaceBinding(format)));
else columns.Format = format;
}

if (FFunc.IsBinding(field.HiddenByKey))
columns.SetBinding(DataGridColumn.VisibleProperty, new Binding("Details." + FData.GetBindingName(FFunc.ReplaceBinding(field.HiddenByKey))){ Converter = FInvertBool.Instance });

return columns;
}


RM RiyasHameed MohamedAbdulKhader Syncfusion Team April 22, 2025 10:15 AM UTC

Hi Nguyen Thinh,

We have reviewed the code snippet you provided. To help us validate the issue further, could you please share the following details:
  • How many DataGridTemplateColumn instances have you used in the implementation?
  • It appears that you have created a custom column (FGridTemplateColumn) by deriving it from DataGridTemplateColumn. Could you please explain the reasoning behind creating this custom column?
  • Can you also share the controls you are using within the CellTemplate and EditTemplate in DataGridTemplateColumn?
  • Additionally, instead of using the predefined columns directly, you have created new columns (FCheckBoxColumn, FDateColumn, FNumericColumn, FTextColumn) based on them. Could you elaborate on the purpose of taking this approach?
  • Lastly, please share how you are currently utilizing the GridTemplateColumn in your implementation.
Alternatively, if possible, please share your application or reproducible sample. This would greatly help us validate the issue and provide a solution as quickly as possible.

Regards,
Riyas Hameed M




NT Nguyen Thinh replied to RiyasHameed MohamedAbdulKhader June 13, 2025 08:17 AM UTC

Sorry for the late reply, the reason we use our own FCheckBoxColumn, FDateColumn, FNumericColumn, FTextColumn base on FGridTemplateColumn cause we need a lot of customization for the grid to binding  and it will take a lot of time to rewrite with the predefined columns, We migrate the code from xamarin which is work perfectly, but in maui it noticeably laggy and slow. Below is our controi using the sfdatagrid SfDataGrid InitGridView() 


Attachment: FInputTable.cs_b511c00a.zip


NT Nguyen Thinh June 13, 2025 09:01 AM UTC

Here is the video, the fist one is the maui and second is the xamarin 
p/s: Also set loaduiview to false improve a bit scrolling performance (not a lot) but also break our ui so it is not a viable option



SD Sethupathy Devarajan Syncfusion Team June 16, 2025 12:22 PM UTC

Hi Nguyen Thinh,

We reviewed the attachment and found only the FInputTable file included.

 

We understand your implementation relies heavily on DataGridTemplateColumn through custom column types like FTextColumn, FDateColumn, etc., and that replacing them with built-in columns isn’t feasible due to your binding and customization requirements.

 

To help us investigate the performance issue further, could you please provide a runnable sample project that includes your FGridTemplateColumn and a few of your custom columns? This will allow us to reproduce and analyze the scrolling behavior directly.

 

Also, you mentioned a video comparison between MAUI and Xamarin, but the video wasn’t attached. Could you please re-share it?

 

Once we have the sample and video, we’ll be in a better position to suggest optimizations or workarounds.

Regards,
Sethupathy D.



NT Nguyen Thinh replied to Sethupathy Devarajan June 17, 2025 02:10 AM UTC

Hi, I've create a runnable sample that includes FGridTemplateColumn, and here is the video link https://drive.google.com/file/d/1ueyb1OQ5x0pTdc92pEkW8NWfIt7Fhe9e/view?usp=sharing, the first one is maui 


Attachment: MauiApp1_8647c41.zip


RM RiyasHameed MohamedAbdulKhader Syncfusion Team June 17, 2025 02:18 PM UTC

Hi Nyugen Thinh,
We have reviewed the sample project and the video reference you provided. To assist you more effectively, we would like to confirm whether your current implementation in the actual application follows the same approach  specifically, using a DataGridTemplateColumn with a Label inside the CellTemplate.
Alternatively, if you are using different UI elements or a more complex layout inside the CellTemplate, please let us know.
If your implementation aligns with the approach shown in your sample, we can suggest an optimized solution using a DataGridCellRenderer or a custom column implementation, along with a working sample to enhance performance.
This information will be helpful for us to proceed with further validation.

Regards,

Riyas Hameed M



NT Nguyen Thinh replied to RiyasHameed MohamedAbdulKhader June 17, 2025 02:25 PM UTC

yeah the FDataColumns is my current implementation



RM RiyasHameed MohamedAbdulKhader Syncfusion Team June 18, 2025 01:08 PM UTC

Nguyen Thinh,

We have validated the reported query and modified the provided sample using the custom column approach, incorporating all the customizations you made in your original sample. The updated sample is attached below for your reference.
Please test the sample and let us know if you are still experiencing scrolling performance issues. Additionally, we kindly request you to test the sample in Release mode and confirm whether the scrolling performance has improved or not.

Attachment: MauiApp1_bb3185c6.zip

Marked as answer

NT Nguyen Thinh replied to RiyasHameed MohamedAbdulKhader June 19, 2025 04:10 AM UTC

the performance in ios is better (still not the same as xamarin one but acceptable, the android one is still having the issue. are there anything like 

ScrollingMode = ScrollingMode.Pixel 

in sfdatagrid in maui (i use that in xamarin)


Attachment: FDataColums.cs_35d5c78.zip



RM RiyasHameed MohamedAbdulKhader Syncfusion Team June 19, 2025 12:13 PM UTC

Nguyen Thinh,
We regret to inform you that the SfDataGrid currently does not have support for ScrollingMode. However, we have considered this a feature request, and it will be included in one of our upcoming releases. We will notify you once the feature is implemented. We appreciate your patience in the meantime.

You can also track and communicate with us regarding open feature requests at any time through our Feature Report page:

Feedback Link: Support for ScrollingMode in MAUI SfDataGrid in .NET MAUI | Feedback Portal

If you have any additional specifications or suggestions for this feature, please feel free to add them as comments on the portal and cast your vote to help prioritize the request.


Loader.
Up arrow icon