Skip to content

Conversation

@BarathAravindKannan
Copy link
Collaborator

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.

{% tabs %}
{% highlight razor tabtitle="Index.razor" %}

@using Syncfusion.Blazor.Grids
@using Syncfusion.Blazor.Buttons

Enable or disable grouped row state persistence

@code {
public List GridData { get; set; }
private bool IsPersist { get; set; } = true;
private string[] Initial = (new string[] { "CustomerID", "ShipCity" });

protected override void OnInitialized()
{
    GridData = OrderData.GetAllRecords();
}

private void Change(Syncfusion.Blazor.Buttons.ChangeEventArgs<bool> args)
{
    if (args.Checked == true)
    {
        IsPersist = true;
    }
    else
    {
        IsPersist = false;
    }
}

}

{% endhighlight %}

{% highlight c# tabtitle="OrderData.cs" %}

public class OrderData
{
public static List Orders = new List();
public OrderData(){}

public OrderData(int? OrderID, string CustomerID, string ShipCity, string ShipName)
{
    this.OrderID = OrderID;    
    this.CustomerID = CustomerID;
    this.ShipCity = ShipCity;
    this.ShipName = ShipName;            
}

public static List<OrderData> GetAllRecords()
{
    if (Orders.Count() == 0)
    {
        int code = 10001;
        string[] customerIDs = { "VINET", "TOMSP", "HANAR", "VICTE", "SUPRD", "CHOPS", "RICSU", "WELLI" };
        string[] cities = { "Reims", "Münster", "Rio de Janeiro", "Lyon", "Charleroi" };
        string[] shipNames = { "Vins et alcools Chevali", "Toms Spezialitäten", "Hanari Carnes", 
                                "Victuailles en stock", "Suprêmes délices", "Chop-suey Chinese", 
                                "Richter Supermarkt", "Wellington Import" };
        for (int i = 0; i < 45; i++)
        {
            string customerID = customerIDs[i % customerIDs.Length];
            string city = cities[i % cities.Length];
            string shipName = shipNames[i % shipNames.Length];
            
            Orders.Add(new OrderData(code, customerID, city, shipName));
            code++;
        }
    }
    return Orders;
}

public int? OrderID { get; set; }
public string CustomerID { get; set; }
public string ShipCity { get; set; }
public string ShipName { get; set; }

}

{% endhighlight %}
{% endtabs %}

{% previewsample "https://blazorplayground.syncfusion.com/embed/VjrotYiMzstTQygM?appbar=false&editor=false&result=true&errorlist=false&theme=bootstrap5" %}

@BarathAravindKannan BarathAravindKannan self-assigned this Sep 11, 2025
@BarathAravindKannan BarathAravindKannan added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 11, 2025
@SyncfusionBuild
Copy link
Contributor

Build Status: INQUEUE 🕒
Build Location: 978251-PersistAndTooltip

@SyncfusionBuild
Copy link
Contributor

Build Status: INPROGRESS 🔃
Build Location: 978251-PersistAndTooltip

@SyncfusionBuild
Copy link
Contributor

CI Status: SUCCESS ✅
Source Compilation: SUCCESS ✅
Build Location: 978251-PersistAndTooltip
Technical Error(s): 0
Spelling Error(s): 0
Image Alt Text Error(s): 0
Image Size Error(s): 0
Image Name Error(s): 0
Front matter Error(s): 0
File Path Error(s): 0
CodeSnippet File Path Missing Error(s): 0
Toc Anchor Tags Validation Error(s): 0
MD Tag Validation Error(s): 0

Copy link
Collaborator

@dhivyasyncfusion dhivyasyncfusion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @BarathAravindKannan , changes are fine

@dhivyasyncfusion dhivyasyncfusion merged commit 19d53a2 into hotfix/hotfix-v31.1.17 Sep 11, 2025
1 check passed
BarathAravindKannan pushed a commit that referenced this pull request Sep 11, 2025
…ltip

978251: Update UG Documentation for PersistGroupState and Tooltip feature
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants