Persistence is not working in a stable way.

Hi there
Persistence is not working in a stable way.
Maybe it works the first time (if you do not resize too many columns (eg 4)) maybe it works ok the second time, then it resets to original state.
There is also a problem when collapsing one column over the previous one by resizing it.
Then, there is no way to rearrange the collapsed column or the column which this column is collapsed to...
Which brings to the necessity of some functionality of a method to bring the grid back to its original settings (when user have the grid messed up).

Thanx a lot!


16 Replies

MS Monisha Saravanan Syncfusion Team May 16, 2022 01:02 PM UTC

Hi Rijakis,


Greetings from Syncfusion support.


We have checked your query and before proceeding further with your requirement kindly share the below details to validate further from our end.


  1. Share us the entire Grid code snippet.
  2. Share us whether you have used EnablePersistence/ handled persistence manually.
  3. Share us the video demonstration of the issue explaining your query.
  4. If possible share us the issue reproduceable sample.


The above-requested details will be very helpful for us to validate the reported query at our end and provide the solution as early as possible.


Regards,

Monisha




RI Rigakis May 16, 2022 08:53 PM UTC

Hi there.
I am sending you the sample.

I am also sending you two videos.

The first one displays the problem of keeping the column sizes to the user settings.
By making this video I discovered that the problem is taking place only if you change the size of the last column.
If the last column is not at the end of the grid, the settings are lost, or the columns are resized so that the grid is ...full by them.

The second video shows the problem with collapsing one column size over another (setting its width practically to zero).
The collapsed column after that is unreachable in any way.
It is still "visible" (you cannot somehow unhide it) and you cannot take it and resize it from then on.
The only way I found this column to reappear is to change the Grids [ID] in code so it will reset to code widths.

Resetting to the original (code) widths and other settings, should be an option that the user should have at his disposal, so that if he messes up with settings, he can reset them to programmer's default.

*I put the videos into the rar because it wouldn't let me upload them.


Attachment: DataGridSample_7564d59d.rar


MS Monisha Saravanan Syncfusion Team May 17, 2022 02:24 PM UTC

Hi Rijakis,


Thanks for contacting Syncfusion support.


Query: “The first one displays the problem of keeping the column sizes to the user settings.”


We have validated and considered your query as a bug and logged the defect report “Persisted Grid does not render properly after Resize” for the same. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle) and will include the fix in our upcoming patch  release which is expected to be rolled out on or before 8th , June 2022.


You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link. 


https://www.syncfusion.com/feedback/34954/persisted-grid-does-not-render-properly-after-resize


Until then we appreciate your patience.


Query: “The second video shows the problem with collapsing one column size over another (setting its width practically to zero).The collapsed column after that is unreachable in any way.”


We suggest you to set MinWidth at column level. So that we can prevent collapsing the column during resize. Kindly refer the attached code snippet and UG for your reference.


<SfGrid ID="Grid20" DataSource="@Orders" AllowPaging="true" EnablePersistence="true" AllowResizing="true"

        Height="200" @ref="Grid">

 

 

    <GridColumns>

        <GridColumn Field=@nameof(Order.OrderID) HeaderText="Order ID" TextAlign="TextAlign.Right" MinWidth="120" Width="200" MaxWidth="300"></GridColumn>

        <GridColumn Field=@nameof(Order.CustomerID) HeaderText="Customer ID" MinWidth="8" Width="200"></GridColumn>

        <GridColumn Field=@nameof(Order.OrderDate) HeaderText=" Order Date" Format="d" Type="ColumnType.Date" TextAlign="TextAlign.Right" MinWidth="8" Width="200"></GridColumn>

        <GridColumn Field=@nameof(Order.Freight) Format="C2" TextAlign="TextAlign.Right" MinWidth="8" Width="150"></GridColumn>

 

    </GridColumns>

</SfGrid>

 


Reference: https://blazor.syncfusion.com/demos/datagrid/column-resize?theme=bootstrap5


Kindly get back to us if you have further queries.


Regards

Monisha





RI Rigakis May 18, 2022 08:25 AM UTC

Hi there.
Thanx for the reply.

One more question in the second issue.
Where does the component save the settings in the browser? 
How can I delete them?



MS Monisha Saravanan Syncfusion Team May 19, 2022 12:44 PM UTC

Hi Rigakis,


Welcome.


Query: “Where does the component save the settings in the browser? How can I delete them?”


We would like to inform that the persisted data is stored in local storage. We don’t have direct support to delete the data present in the local storage. Instead you can clear the persisted data by using ResetPersistData method of DataGrid. Kindly check the attached UG for your reference.


Reference: https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Grids.SfGrid-1.html?&_ga=2.160915835.758002101.1652674812-1234523538.1646292972#Syncfusion_Blazor_Grids_SfGrid_1_ResetPersistData


https://blazor.syncfusion.com/documentation/datagrid/state-management#handling-grid-state-manually


Kindly get back to us if you have further queries.


Regards,

Monisha



RI Rigakis May 20, 2022 09:27 AM UTC

This is exactly what I need it.
Thanks a lot!

Now I'm trying to add in the column context menu the option to " ResetPersistData"

I cannot find information about the "Target" option of "ContextMenuItemModel".
I found out that "
.e-content" is for the body of the Grid, but i cannot find anywhere what value refers to every section in the grid (particularly column header) 
Documentation just says it's type of string...




MS Monisha Saravanan Syncfusion Team May 23, 2022 01:10 PM UTC

Hi Rigakis,


Thanks for the update.


Query: “I cannot find information about the "Target" option of "ContextMenuItemModel". I found out that ".e-content" is for the body of the Grid, but i cannot find anywhere what value refers to every section in the grid (particularly column header) ”


We suggest you to use .e-header class for header section. Kindly refer the attached code snippet and sample for your reference. For additional information Kindly refer the attached code snippet and sample for your reference.



 

<SfGrid @ref="DefaultGrid" ID="grid1" AllowFiltering="true" EnablePersistence=true DataSource="@Orders" AllowPaging="true" ContextMenuItems="@(new List<ContextMenuItemModel>() { new ContextMenuItemModel { Text = "Reset Persist Data", Target = ".e-header", Id = "reset" } })">

    <GridEvents ContextMenuItemClicked="OnContextMenuClick" TValue="Order"></GridEvents>

</SfGrid>

 

@code{

 

    public void OnContextMenuClick(ContextMenuClickEventArgs<Order> args)

    {

        if (args.Item.Id == "reset")

        {

            this.DefaultGrid.ResetPersistDataAsync();

        }

    }

}



Reference: https://blazor.syncfusion.com/documentation/datagrid/how-to/grid-styling


Kindly get back to us if you have further queries.


Regards,

Monisha



RI Rigakis May 23, 2022 02:43 PM UTC

Worked just fine!
Thanx a lot!!!



MS Monisha Saravanan Syncfusion Team May 24, 2022 03:36 AM UTC

Hi Rigakis,


Welcome.


Kindly get back to us if you have further queries. As always we will be happy to help you.


Regards,

Monisha



MS Monisha Saravanan Syncfusion Team June 10, 2022 01:54 PM UTC

Hi Rijakis,


Sorry for the inconvenience caused.


Due to some unforeseen circumstances, we could not able to include the fix for the issue “Persisted Grid does not render properly after Resize” in our mentioned weekly release But we will fix this issue and this will be included in our upcoming bi-weekly release which is expected to be rolled out on or before June 29th , 2022.


We will update you once the release is rolled out. Until then we appreciate your patience.   


Regards,

Monisha   



MS Monisha Saravanan Syncfusion Team July 5, 2022 05:42 AM UTC

Hi Rijakis,


Sorry for the inconvenience caused.


We are facing difficulties in including the fix for the issue “Persisted Grid does not render properly after Resize” in our mentioned weekly release as promised. But we will fix this issue and this will be included in our upcoming bi-weekly release which is expected to be rolled out on or before July 27th , 2022.


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization”


We will update you once the release is rolled out. Until then we appreciate your patience.   


Regards,

Monisha 



MS Monisha Saravanan Syncfusion Team August 11, 2022 01:47 PM UTC

Hi Rijakis,


Sorry for the inconvenience caused.


We are facing difficulties in including the fix for the issue “Persisted Grid does not render properly after Resize” in our mentioned weekly release as promised. But we will fix this issue and this will be included in our upcoming bi-weekly release which is expected to be rolled out on or before August 24th , 2022.


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization”


We will update you once the release is rolled out. Until then we appreciate your patience.   


Regards,

Monisha 



MS Monisha Saravanan Syncfusion Team August 25, 2022 02:56 PM UTC

Hi Rijakis,


Sorry for the inconvenience caused.


We are facing difficulties in including the fix for the issue “Persisted Grid does not render properly after Resize” in our mentioned weekly release as promised. But we will fix this issue and this will be included in our upcoming bi-weekly release which is expected to be rolled out on or before August 31st  , 2022.


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization”


We will update you once the release is rolled out. Until then we appreciate your patience.   


Regards,

Monisha 



MS Monisha Saravanan Syncfusion Team September 6, 2022 09:02 AM UTC

Hi Rijakis,


We regret for the inconvenience caused.


We are facing difficulties in including the fix for the issue “Persisted Grid does not render properly after Resize” in our mentioned weekly release as promised. But we will fix this issue and this will be included in our upcoming bi-weekly release which is expected to be rolled out on or before September 20th  , 2022.


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization”


We will update you once the release is rolled out. Until then we appreciate your patience.   


Regards,

Monisha 




MS Monisha Saravanan Syncfusion Team October 4, 2022 02:27 PM UTC

Hi Rijakis,


We regret for the inconvenience caused.


We are facing difficulties in including the fix for the issue “Persisted Grid does not render properly after Resize” in our mentioned weekly release as promised. But we will fix this issue and this will be included in our upcoming bi-weekly release which is expected to be rolled out on or before October 11th  , 2022.


Disclaimer: “Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization”


We will update you once the release is rolled out. Until then we appreciate your patience.   


Regards,

Monisha 



MS Monisha Saravanan Syncfusion Team October 19, 2022 01:53 PM UTC

Hi Rijakis,


We are glad to announce that, we have included fix for the issue “Persisted Grid does not render properly after Resizein our release (20.3.0.50).  So please upgrade to our latest version of Syncfusion NuGet package to resolve the reported issue. Please find the Nuget package for latest fixes and features from below.


Nuget : https://www.nuget.org/packages/Syncfusion.Blazor.Grid


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 

   

Regards,            

Monisha


Loader.
Up arrow icon