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.
Unfortunately, activation email could not send to your email. Please try again.

new GroupSettings on ejGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

130410 May 11,2017 07:10 AM Jun 22,2017 08:35 AM ASP.NET Core 3
loading
Tags: Grid
David
Asked On May 11, 2017 08:27 AM

Hello, I've created a grid in my project and I want to enable the grouping so I've add "allow-grouping="true" but I want also an initial grouping but with the command "group-settings ="@(new GroupSettings { GroupedColumns= new List() { "ShipCountry" } })"" it returns me an error saying that GroupSettings could not be found.I've also tried with  between the and the but it returns me that doesn't allow it as a child.How can I solve this problem? Thanks, best regards.David UPDATE: adding Syncfusion.JavaScript.Models.GroupSettings it seems i solved that problem but now it appears the initial grouping during the loading and suddenly disappears on loaded page, seems like it falls back on a default value...

Farveen Sulthana Thameeztheen Basha [Syncfusion]
Replied On May 12, 2017 07:25 AM

Hi David, 

Thanks for contacting syncfusion support. 

While checking your code for initialGrouping, you have  mentioned the “GroupedColumns= new List()” instead “GroupedColumns = new List<string>()”  that leads to your reported problem. Please follow the syntax as per given code example and Help document. 

Please refer to the code example:- 

 
<ej-grid id="FlatGrid" allow-paging="true" allow-grouping="true" group-settings ="@(new GroupSettings { GroupedColumns= new List<string>() { "CustomerID" } })" > 
     
<e-datamanager url="/Home/DataSource" insert-url="/Home/CellEditInsert" update-url="/Home/CellEditUpdate" remove-url="/Home/CellEditDelete"  adaptor="UrlAdaptor" ></e-datamanager> 
    <e-columns> 
        <e-column field="OrderID" is-primary-key="true" header-text="Order ID" text-align="Right" width="70"></e-column> 
        <e-column field="CustomerID" header-text="Customer ID" width="80"></e-column> 
         
        
    </e-columns> 
</ej-grid> 

Please refer to the Help document :- 


Regards, 

Farveensulthana T 


Dmitriy
Replied On June 21, 2017 09:12 AM

Hello. 

This example https://help.syncfusion.com/aspnet-core/grid/grouping?cs-save-lang=1&cs-lang=razor#initial-grouping doesn't work (There is no class GroupSettings at all). If delete initial grouping and try group manually - there are no result. Please, help.

P.S.

Also try to use this example http://aspnetcore.syncfusion.com/grid/grouping 


Seeni Sakthi Kumar Seeni Raj [Syncfusion]
Replied On June 22, 2017 08:35 AM

Hi David,  
 
We suspect you are missing namespace Syncfusion.JavaScript.Models in the Grid page. So we suggest to follow the code example and update the same at your end.  
 
 
@using Syncfusion.JavaScript.Models; 
 
 
<ej-grid id="FlatGrid"  allow-paging="true" datasource="ViewBag.data" allow-grouping="true" group-settings ="@(new GroupSettings { GroupedColumns= new List<string>() { "CustomerID" } })"> 
    <e-columns> 
        <e-column field="ID" header-text="Order ID" is-primary-key="true" text-align="Right" width="75"> </e-column> 
        <e-column field="CustomerID" header-text="Customer ID" width="80"></e-column> 
        <e-column field="EmployeeID" header-text="Employee ID" text-align="Left" width="75"></e-column> 
    </e-columns> 
</ej-grid> 
 
We have prepared a sample that can be downloaded from the following location.  
 
 
If you are still facing any problem, please share the following details to analyze the problem at our end.  
 
1)      Code example of the Grid 
2)      Screenshot for the issue 
3)      If possible, modify the attached sample and reproduce the issue 
 
Regards,  
Seeni Sakthi Kumar S. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;