We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Sort columns

Capture.PNG Why is it that when I use the "ReorderColumnByTargetIndexAsync()" method to sort columns, I have to reload the page several times to get it right? For example, I create 1 button to call this method, when I click on this button, it should have arranged it exactly as I wanted, not many times.


3 Replies

BL Balamurugan Lakshmanan Syncfusion Team April 5, 2023 04:44 PM UTC

Hi Duong


Greeting from Syncfusion support.


We have a methods to reorder the column .Kindly refer the below link  for your reference.


https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.SfGrid-1.html#Syncfusion_Blazor_Grids_SfGrid_1_ReorderColumnsAsync_System_Collections_Generic_List_System_String__System_String_


For changing the position for multiple column , we have to use the ReorderColumnbyTargetIndex. In this method ,the pages have reloaded number of times based on the number of methods called and it is the default behaviour.


Please get back to us if you have further queries.


Regards,

Bala.



DQ Duong Quoc April 7, 2023 03:44 AM UTC

I found the EnablePersistence="true" event to save grid operations. If so, where are these operations saved and what if I want to interfere? Suppose: When I publicize this site, not 1 I use it, but many users. If it is saved on each person's browser, then I want when I update the operations on the server, the subcomputers should be the same.



BL Balamurugan Lakshmanan Syncfusion Team April 11, 2023 11:03 AM UTC

Hi Duong

 

When the EnablePersistence property of the Syncfusion Blazor Grid is set to true, the grid's operations, such as filtering, sorting, and paging, are saved in the browser's local storage. The operations are saved as a JSON string in the local storage of the user's browser.

 

If you want to interfere with the saved operations, you can do so by accessing the grid's client-side API. The grid exposes a set of methods and events that can be used to interact with the saved state.

 

If I misunderstand your query, Kindly explain your requirement briefly to validate further at our end.

 

Please get back to us if you have further queries.

 

Regards,

Bala.


Loader.
Up arrow icon