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!
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.
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
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.
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
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?
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.
https://blazor.syncfusion.com/documentation/datagrid/state-management#handling-grid-state-manually
Kindly get back to us if you have further queries.
Regards,
Monisha
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...
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
Worked just fine!
Thanx a lot!!!
Hi Rigakis,
Welcome.
Kindly get back to us if you have further queries. As always we will be happy to help you.
Regards,
Monisha
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
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
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
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
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
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
Hi Rijakis,
We are glad to announce that, we have included fix for the issue “Persisted Grid does not render properly after Resize” in 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