Customize freeze panes style and sort data skipping freeze panes

Hi, Syncfusion Team

I couldn’t find any workaround of changing the style of datagrid freeze panes without a single FreezePaneLineColor property. I need to customize the freeze rows like - bold the font of full row contents, changing font color, add customized icons on the cells of the freeze row.


Also I have noticed when I sort data grid by any column, freeze panes row value changes. I don’t want to change the freeze row value. Like the freezes row remains pinned (by double clicking the row) always on the top whether a new data is added, removed or applying manual sort.


It will be a great help if you guys provide a workaround on this matter. Thanks.



5 Replies

SD Sethupathy Devarajan Syncfusion Team July 29, 2024 02:00 PM UTC

Hi Rashidul Hasan,


Query

Response

I need to customize the freeze rows like - bold the font of full row contents, changing font color, add customized icons on the cells of the freeze row.

 

You can achieve this with conditional styling. We have shared a simple sample and video demo for your reference.

I don’t want to change the freeze row value. Like the freezes row remains pinned (by double clicking the row) always on the top whether a new data is added, removed or applying manual sort.

Unfortunately, the functionality you're describing "keeping a frozen row always pinned at the top regardless of new data additions, removals, or manual sorting" is not supported in SfDataGrid..



Regards,

Sethupathy D.


Attachment: SfDataGridSample_5984f1f0.zip


MR Md. Rashidul Hasan July 30, 2024 08:21 AM UTC

Thanks for the reply. Is there any controls or something available in syncfusion where we can achieve the 2nd requirement - "Pinned a certain row always"?

Can we do something like this in MAUI? Ref : https://support.syncfusion.com/kb/article/11443/how-to-ignore-the-last-row-from-being-sorted-in-flutter-datatable-sfdatagrid



SD Sethupathy Devarajan Syncfusion Team July 30, 2024 01:26 PM UTC

Hi Rashidul Hasan,

Based on the provided information, it is clear that you need to pin a certain row always. You can achieve this with an unbound row fixed at the top. We have shared a sample , video demo and the UG documentation link for your reference. Please note that performing manual sorting will not affect the added unbound row.


Ug link : UnBoundRow


Regards,

Sethupathy D.


Attachment: SfDataGridSample_bca07a66.zip


MR Md. Rashidul Hasan July 30, 2024 01:52 PM UTC

Thanks again. How can I set the style of the unbound row like the data grid rows style so that every row looks similar. Note that I have used different custom column template for each of the column.

Also, how can I refresh the unbound rows data dynamically if the data grid data changes too frequently?

I am setting the property of unbound rows if I double click any row of the data grid. Then remove the row from the item source to discard the duplicate data. But when I click another row, how can I put the previous unbound row data back to actual position of main data grid if the sorting is applied?

For example, there are 5 rows : from A to E. First select row C. It will go top in unbound row. So the data rows look like - C, A, B, D, E. Then applying random column sort - C, D, A, E, B

Now select row A. Row A will go top. Spouse this situation actual sequence has to be - A, B, D, C, E.  In this situation, how can I determine row C will be in 4th position with sort applying? Or is there any option I can put row C in such position in sorted data grid view?



AP Abinesh Palanisamy Syncfusion Team August 2, 2024 10:33 AM UTC

Hi Rashidul Hasan,


Query

Response

How can I set the style of the unbound row like the data grid rows style so that every row looks similar.

You can set the style of the unbound row with implicit styling or default styling. We have shared the UG documentation links for your reference.

 

UG links: StylingUnboundCellStylingUnboundRow

How can I refresh the unbound rows data dynamically if the data grid data changes too frequently

You can refresh the unbound rows at runtime by calling the SfDataGrid.invalidateUnboundRow method.

datagrid!.InvalidateUnboundRow(datagrid!.UnboundRows[0]);

I am setting the property of unbound rows if I double click any row of the data grid. Then remove the row from the item source to discard the duplicate data. But when I click another row, how can I put the previous unbound row data back to actual position of main data grid if the sorting is applied?

The CellDoubleTapped event is triggered when a cell in the DataGrid is double-tapped. You can use this event to implement logic for adding the respective rows to an unbound row and removing duplicates from the collection. This approach will help you achieve the desired behavior.

 

We have included a sample for your reference. Please review this sample for more details and adjust it to fit your specific requirements.



Regards,

Abinesh P


Attachment: SfDataGridSample_f8f5d47f.zip

Loader.
Up arrow icon