This is a migrated thread and some comments may be shown as answers.

[Solved] One View Multiple Grids with Server Binding

3 Answers 125 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David
Top achievements
Rank 1
David asked on 28 Sep 2010, 04:31 PM
Does the Telerik ASP.NET MVC Grid support multiple server bound grids with EnableCustomerBinding(true)? I know I could solve this problem by using AJAX, but my project has a requirement for Section 508 compatibility. So all changes to the page require a complete request response cycle.

3 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 29 Sep 2010, 09:20 AM
Hi David,

It is not possible out of the box. However you can achieve it via some boiler plate code. I am sending you a sample project which shows how to do that.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
David
Top achievements
Rank 1
answered on 29 Sep 2010, 06:18 PM
While this answers my question. I cant help but wonder why GridAction attribute doesn't support this behavior. After looking at the source it seems like it would support this behavior since you can specify the ActionParameterName and the Grid Name. Granted Nothing stops me from moving the code you sent me into an ActionFilter attribute that does exactly that but allows for more than one attribute to populate different GridCommand objects.
0
Atanas Korchev
Telerik team
answered on 30 Sep 2010, 07:34 AM
Hi David,

 Your suggestion makes good sense however the GridActionAttribute can currently be applied only once. I will investigate further if it is possible to support this:

        [GridAction(ActionParameterName="command1", GridName="Grid1")]
        [GridAction(ActionParameterName="command2", GridName="Grid2")]
        public ActionResult Index(GridCommand command1, GridCommand command2)
        {
            ViewData["Grid1"] = ApplyCommand(Model(), command1);
            ViewData["Grid2"] = ApplyCommand(Model(), command2);
            return View();
        }

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
David
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
David
Top achievements
Rank 1
Share this question
or