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

[Solved] Problem with PageInput

2 Answers 42 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.
Yoel A.F.
Top achievements
Rank 1
Yoel A.F. asked on 02 Aug 2010, 03:54 PM
Hello,
I have a problem using the method Style(GridPagerStyles.PageInput) of Pageable. When the browser renders the page the first time shows the text "of {0}". The Extensions for ASP.NET MVC Q2 2010 Beta Live Examples have the same problem.
I'm using MVC2 and Telerik_Extensions_for_ASPNET_MVC_Q2_2010_2_713.

Could you indicate me how I should fix this problem?
Thanks.

Code:
In TestSampleController.cs
public ActionResult TestSample()
{
  int total;
  //First Loading
  ViewData["PageSize"] = 10;
  IList<CZone> zones = _zoneRepo.GetAll(0, 10, out total);
  ViewData["Total"] = total;
  return View(zones);
}
 
[GridAction(EnableCustomBinding = true)]
public ActionResult _TestSample(GridCommand command)
{
  int total;
  return View(new GridModel<CZone>
  {
    Data = _zoneRepo.GetAll((command.Page - 1) * command.PageSize, command.PageSize, out total),
    Total = total
  });
}

In the view,
<%= Html.Telerik().Grid(Model)
        .Name("GridZone")
                .PrefixUrlParameters(false)
                .EnableCustomBinding(true)
                .Columns(columns =>
        {
                    columns.Bound(z => z.Id);
                    columns.Bound(z => z.CodeZone).Title("Zone Code");
                    columns.Bound(z => z.DescZone).Title("Zone Name");
                })
                .DataBinding(dataBinding => dataBinding.Ajax().Select("_TestSample", "TestSample"))
                .Pageable(pager =>
                    {
                        pager.Total((int)ViewData["Total"]);
                        pager.PageSize((int)ViewData["PageSize"]);
                        pager.Style(GridPagerStyles.PageInput | GridPagerStyles.NextPreviousAndNumeric);
                    })
                .Scrollable()
 
%>

2 Answers, 1 is accepted

Sort by
0
Accepted
Hristo Germanov
Telerik team
answered on 03 Aug 2010, 01:34 PM
Hi Yoel A.F.,

I am glad to inform you that this bug is now fixed and the hotfix will be included with the next release.

Regards,
Hristo Germanov
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
Yoel A.F.
Top achievements
Rank 1
answered on 03 Aug 2010, 01:56 PM
Hi Hristo,

Thank you by your answer. I'll be waiting the next release.

Regards, Yoel
Tags
Grid
Asked by
Yoel A.F.
Top achievements
Rank 1
Answers by
Hristo Germanov
Telerik team
Yoel A.F.
Top achievements
Rank 1
Share this question
or