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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Grouping on Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

126134 Sep 26,2016 04:58 PM UTC Sep 27,2016 01:23 PM UTC ASP.NET MVC 1
loading
Tags: Grid
Dayne
Asked On September 26, 2016 04:58 PM UTC


Hi, 

I want to group the grid by following the examples in the documentation, but I have an error "UnpaidBills_JSONTemplate"

This is the code that I use

@(Html.EJ().Grid<BillData>("UnpaidBills")
            .Datasource(ds => ds.Json((IEnumerable<BillData>)ViewBag.UnpaidBills))           
            .AllowGrouping()
            .GroupSettings(group => { group.GroupedColumns(col => { col.Add("Vendor");}); })
            .PageSettings(paging => paging.PageSize(50))
            .AllowFiltering()
            .FilterSettings(filter => { filter.FilterType(FilterType.Excel); })           
            .Columns(col =>
            {
                col.Field("Id").IsPrimaryKey(true).Visible(false).Add();
                col.Field("Vendor").HeaderText("Proveedor").TextAlign(TextAlign.Center).Width(70).AllowEditing(false).Priority(1).Add();
                col.Field("RefNumber").HeaderText("Factura").TextAlign(TextAlign.Center).Width(35).AllowEditing(false).Add();
                col.Field("TxnDate").HeaderText("Fecha").Format("{0:dd/MM/yyyy}").TextAlign(TextAlign.Center).Width(30).AllowEditing(false).Add();
                col.Field("DueDate").HeaderText("Vencimiento").Format("{0:dd/MM/yyyy}").TextAlign(TextAlign.Center).Width(42).AllowEditing(false).Add();               
            })          
        )

And the result is like this


Vendor: ABC LEASING DE MEXICO SAPI DE CV - 2 artículos
UnpaidBills_JSONTemplateUnpaidBills_JSONTemplate


Vendor: AMERICAN POWER CONVERSION U - 1 artículos
UnpaidBills_JSONTemplate


Vendor: BARMEX, S.A. DE CV - 4 artículos
UnpaidBills_JSONTemplateUnpaidBills_JSONTemplateUnpaidBills_JSONTemplateUnpaidBills_JSONTemplate



Please Help. What am I doing wrong? What have I miss or overlook?



Karthick Kuppusamy [Syncfusion]
Replied On September 27, 2016 01:23 PM UTC

Hi Dayne, 

Thanks for Contacting Syncfusion support. 

We have analyzed the provided code and we are not able to reproduce the reported issue at our end with the provided information. 

Please find the code example. 

 
@(Html.EJ().Grid<object>("FlatGrid") 
        .Datasource((IEnumerable<object>)ViewBag.datasource) 
        .AllowScrolling() 
         .AllowPaging()    
            .AllowGrouping()  
          .GroupSettings(group => { group.GroupedColumns(col => { col.Add("CustomerID"); }); })//grouped columns 
           .AllowFiltering() 
           .FilterSettings(filter => { filter.FilterType(FilterType.Excel); })           
          .SelectionType(SelectionType.Single) 
               .ToolbarSettings(toolbar => 
                { 
                    toolbar.ShowToolbar().ToolbarItems(items => 
                    { 
                        items.AddTool(ToolBarItems.Add); 
                        items.AddTool(ToolBarItems.Edit); 
                        items.AddTool(ToolBarItems.Delete); 
                        items.AddTool(ToolBarItems.Update); 
                        items.AddTool(ToolBarItems.Cancel); 
                    }); 
                }) 
                .EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing(); }) 
                .Columns(col => 
        { 
            col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).Visible(false).TextAlign(TextAlign.Right).Width(75).Add(); 
            . 
            . 
            . 
          })) 


For your reference we have created a sample based on your requirement and same it can be downloaded from the following location. 

Online Link: 

Please share the following details to us it would be helpful for us to find the prompt solution. 

1.Please share the controller code. 

2.Please reproduce the issue in the attached sample and revert back to us if it is possible. 

3.Share more details about your requirement to reproduce the issue. 


Regards, 
K.Karthick. 

 


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.

Warning Icon 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.Close Icon

;