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

[Solved] Bug In GridActionAttribute/GridCommand

3 Answers 87 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.
Kevin Watkins
Top achievements
Rank 1
Kevin Watkins asked on 08 Jan 2010, 05:54 PM
Hi,

Sorry for posting a bug report here but my account won't let me file a support ticket and I couldn't see anywhere else to report a bug!

I'm using custom binding so I have something like this in my code:

[

GridAction(EnableCustomBinding = true, ActionParameterName = "gridCommand")]

 

 

public ActionResult Grid(GridCommand gridCommand)

 


However the GridCommand.PageSize property isn't being set correctly; it always has a default value of 10. Looking at the source for GridActionAttribute there is the following snippet:

GridCommand command =

new GridCommand

 

{

   Page = filterContext.Controller.ValueOf<

int>(GridUrlParameters.CurrentPage)

 

};


Changing this to:

GridCommand command = new GridCommand

 

{

   Page = filterContext.Controller.ValueOf<

int>(GridUrlParameters.CurrentPage),

 

   PageSize = filterContext.Controller.ValueOf<int>(GridUrlParameters.PageSize)
};


Should fix things.

Cheers,

Kev

3 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 11 Jan 2010, 09:29 AM
Hi Kevin Watkins,

You are absolutely right. This seems to be an omission from our end. I will fix the bug in the way you suggested.

Regards,
Atanas Korchev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Kevin Watkins
Top achievements
Rank 1
answered on 11 Jan 2010, 04:07 PM
Excellent! Any idea when you might release a version with this fix in? Or add the fix to the source on CodePlex so I can build my own version?

Thanks,

Kev
0
Atanas Korchev
Telerik team
answered on 11 Jan 2010, 04:09 PM
Hello Kevin Watkins,

We have not scheduled the next service pack yet. Still since we provide the source code with the ZIP you can add the fix there.

Regards,
Atanas Korchev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Kevin Watkins
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Kevin Watkins
Top achievements
Rank 1
Share this question
or