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.
Syncfusion Feedback

templating Grid groups

Thread ID:

Created:

Updated:

Platform:

Replies:

118417 Mar 6,2015 08:00 AM UTC Feb 18,2016 09:25 AM UTC ASP.NET MVC 7
loading
Tags: Grid
issam
Asked On March 6, 2015 08:00 AM UTC

Hi,

is there a way to template groups for MVC grid?

Prasanna Kumar Viswanathan [Syncfusion]
Replied On March 9, 2015 12:45 PM UTC

Hi Issam,

Thanks for using Syncfusion products.

Query : “is there a way to template groups for MVC grid?”

We are unable to understand your requirement clearly. Are you asking about the column template or grouping template in grid?

Please provide more detailed information about your requirement, which will be helpful for us to provide a better solution.

With Regards,

Prasanna Kumar N.S.V



issam
Replied On March 9, 2015 02:22 PM UTC

yes sorry for the lack of informations .

i am porting a web application i did some time ago to syncfusion, here how it looks :



so actually red texts are groups , i want to replicate the same layout with sf mvc grid .
also it would be nice if i can disable groups collapsing .

thanks


Prasanna Kumar Viswanathan [Syncfusion]
Replied On March 10, 2015 05:38 PM UTC

Hi Issam,

We considered this requirement “Grouping Caption Template” as a feature . For your convenience, we have a created a workaround sample and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents

Regards,

Prasanna Kumar N.S.V



issam
Replied On March 16, 2015 03:48 PM UTC

thanks .

Prasanna Kumar Viswanathan [Syncfusion]
Replied On March 17, 2015 12:45 PM UTC

Hi Issam,

Thanks for the update,

Regards,

Prasanna Kumar N.S.V

coffeebean
Replied On February 17, 2016 08:03 AM UTC

Hi, 

I need something similar, is there an update on this and a sample on how to get this look and feel?

Prasanna Kumar Viswanathan [Syncfusion]
Replied On February 18, 2016 09:25 AM UTC

Hi Issam,

We suggest you to use captionFormat API in the GroupSettings to change the group caption manually and upgrade to the latest version (13.4.0.53) to use this API.

Please find the code example and sample,


@(Html.EJ().Grid<Sample118417.OrdersView>("FlatGrid")

        .Datasource((IEnumerable<object>)ViewBag.datasource)

        .AllowScrolling()

         .AllowPaging()    /*Paging Enabled*/

         .AllowGrouping()

        .GroupSettings(group => { group.GroupedColumns(col => { col.Add("ShipCity"); }).CaptionFormat("{{:field}} = {{:key}} && {{:count}}"); })

        .Columns(col =>

        {

            col.Field("OrderID").HeaderText("Order ID").IsPrimaryKey(true).TextAlign(TextAlign.Right).Width(75).Add();

            col.Field("CustomerID").HeaderText("Customer ID").Width(80).Add();

            col.Field("EmployeeID").HeaderText("Employee ID").TextAlign(TextAlign.Right).Width(75).Add();

            col.Field("Freight").HeaderText("Freight").TextAlign(TextAlign.Right).Width(75).Format("{0:C}").Add();

            col.Field("ShipCity").HeaderText("Ship City").Width(80).Add();

        })

         

)
  


Sample : http://www.syncfusion.com/downloads/support/forum/118417/ze/Sample1184171512703556

Refer to the Help document for the captionFormat API,

http://help.syncfusion.com/js/api/ejgrid#members:groupsettings-captionformat

Regards,
Prasanna Kumar N.S.V


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

;