978251: Update UG Documentation for PersistGroupState feature #6568
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feature description
Create UG Documentation for following support.
Support to maintain expand/collapse state of Groups in Grid during certain actions like Sorting, Filtering, Paging, CRUD operations.
UG Task link : https://dev.azure.com/EssentialStudio/Ej2-Web/_workitems/edit/978251
Feature implemenation Task URL: https://dev.azure.com/EssentialStudio/Ej2-Web/_workitems/edit/968776
List of PRs for the support given:
Core concept : https://gitea.syncfusion.com/essential-studio/ej2-blazor-source/pulls/24168
Covered methods : https://gitea.syncfusion.com/essential-studio/ej2-blazor-source/pulls/24538
Revamped by avoiding pagewise persistence : https://gitea.syncfusion.com/essential-studio/ej2-blazor-source/pulls/24837
API And XML - https://gitea.syncfusion.com/essential-studio/ej2-blazor-source/pulls/24887
Reset on dynamic change of prop - https://gitea.syncfusion.com/essential-studio/ej2-blazor-source/pulls/24923
Playwright - https://gitea.syncfusion.com/essential-studio/blazor-grid-playwright-tests/pulls/1414
Preview for documentation part:
Persist grouped row expand or collapse state
The Syncfusion Blazor DataGrid offers the ability to persist the expand or collapse state of grouped rows across various data operations such as paging, sorting, filtering, and editing. By default, these operations reset the grouped rows to their initial collapsed or expanded state.
To retain the current state of grouped rows and ensure a consistent user experience, set the GridGroupSettings.PersistGroupState property to true. This also applies when using external grouping methods like ExpandAllGroupAsync and CollapseAllGroupAsync.
The following example demonstrates how to dynamically enable or disable the
PersistGroupStateproperty in the DataGrid.{% tabs %}
{% highlight razor tabtitle="Index.razor" %}
@using Syncfusion.Blazor.Grids
@using Syncfusion.Blazor.Buttons
<SfGrid @ref="Grid" DataSource="@griddata" AllowGrouping="true" Height="315px" AllowSorting="true">
@code {
public List GridData { get; set; }
SfGrid? Grid { get; set; }
}
{% endhighlight %}
{% highlight c# tabtitle="OrderData.cs" %}
public class OrderData
{
public static List Orders = new List();
public OrderData(){}
}
{% endhighlight %}
{% endtabs %}
{% previewsample "https://blazorplayground.syncfusion.com/embed/hNroDvrRpDAvxclV?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}