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

Paging vs. grouping

Thread ID:

Created:

Updated:

Platform:

Replies:

103046 Mar 27,2012 08:37 AM UTC Apr 5,2012 12:17 PM UTC ASP.NET MVC (Classic) 4
loading
Tags: Grid
Petar Raykov
Asked On March 27, 2012 08:37 AM UTC

Hi guys,

I’m trying to implement the following use case:
I want to have a grid with paging and grouping. That’s ok and works. When I group the elements, I see only the grouping inside the single page. I have to implement a mechanism that deactivate the paging, when the groping feature was used.
I’m using the JSON Action mode.

Hier is my controller:

public ActionResult Table()
{


GridPropertiesModel gridModel = new GridPropertiesModel()
{
Caption = "Orders",
AutoFormat =
Syncfusion.Mvc.Shared.Skins.Office2007Blue,
AllowFiltering = true,
AllowGrouping = true,
AllowPaging = true,
ActionMode = ActionMode.JSON
};


ViewData["GridModel"] = gridModel;

return View();
}

[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Table(Syncfusion.Mvc.Grid.PagingParams args)
{
GridPropertiesModel gridModel = findTheGridByID(args.ID);
gridModel.AllowPaging = false;


List data = getList();

return data.AsEnumerable().GridJSONActions();
}

Any ideas how to implement the function findTheGridByID(string id)?

Kind regards,
Petar Raykov



Bala Murugan A.S [Syncfusion]
Replied On March 28, 2012 06:26 AM UTC

Hi Petar Raykov,

Thanks for using Syncfusion Products.

We suggest you to use OnActionBegin ClientSideEvents for your requirement to deactivate paging when grouping is enabled. Please refer the below code snippet.

[Controller]
GridPropertiesModel model = new GridPropertiesModel()
{
Caption = "Orders",
DataSource = OrderRepository.GetAllRecords(),
AutoFormat = Syncfusion.Mvc.Shared.Skins.Office2007Blue,
AllowFiltering = true,
AllowGrouping = true,
AllowPaging = true,
AllowSorting = true,
ActionMode = ActionMode.JSON,

};
model.ClientSideEvents.OnActionBegin = "ActionBegin";

[JavaScript]


For your convenience, we have prepared a simple sample to demonstrate this and the same can be downloaded from the below link.

http://www.syncfusion.com/downloads/Support/DirectTrac/92571/SelectedRows-1798786851.zip

Please try the above sample and let us if you have any concerns.

Regards,
Bala Murugan A.S




Petar Raykov
Replied On March 28, 2012 02:48 PM UTC

Hi,

thank you for your responce. The way you suggested is super. Unfortunately the example (and the code in your post) doesn't work with IE9 and Firefox 11.

When i drag the group to the grouping place 2 POST-requests will be maked:
1. args.requestType == "grouping"
2. args.requestType == "paging"

The first is ok, but the second cuts my result to size of one page.


Bala Murugan A.S [Syncfusion]
Replied On March 29, 2012 04:21 PM UTC

Hi Petar Raykov,

Thanks for the update.

Currently we are working on your query. We will update you within two business days(April 2, 2012).

Please let us know if you have any concerns.

Regards,
Bala Murugan A.S


Bala Murugan A.S [Syncfusion]
Replied On April 5, 2012 12:17 PM UTC

Hi Petar Raykov,

Thanks for your patience.

Sorry for the delay in getting back to you. We suggest you to use the below code in order to resolve your reported issue. Please refer the below code snippet.

[Controller]
model.ClientSideEvents.OnActionBegin = "ActionBegin";
model.ClientSideEvents.OnActionComplete = "ActionComplete";

[JavaScript]

For your convenience, we have modified the sample which was provided earlier and the same can be downloaded from the below link.

sample link: http://www.syncfusion.com/downloads/Support/DirectTrac/General/SelectedRows-1021194118.zip

Please try the above sample and let us know your concerns.

Regards,
Bala Murugan A.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.

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

;