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

Using GridPagerStyles.NextPreviousAndNumeric with Server Binding

4 Answers 40 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.
Chris
Top achievements
Rank 1
Chris asked on 06 May 2010, 05:35 PM
I am using this code to create a server-bound grid:

                <%
                   Html.Telerik().Grid<AuditSummary>()
                       .Name("AuditGrid")
                       .BindTo(Model.AuditSummaryQuery)
                       .Columns(columns =>
                                    {
                                        columns.Bound(a => a.Id);
                                        columns.Bound(a => a.UserNameLastFirst).Title("User");
                                        columns.Bound(a => a.Action);
                                        columns.Bound(a => a.Event);
                                        columns.Bound(a => a.IPAddress);
                                        columns.Bound(a => a.DateTime);
                                    })
                       .Pageable(settings =>
                                     {
                                         settings.Total(Model.RecordCount);
                                         settings.Style(GridPagerStyles.PageInput | GridPagerStyles.NextPreviousAndNumeric);
                                     })
                       .EnableCustomBinding(true)
                       .Sortable()
                       .Render();
                %>

It properly renders the textbox for the current page, but pressing enter does nothing. it doesn't appear that a form is sent in the response at all. Any ideas?

4 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 07 May 2010, 07:44 AM
Hi Christopher,

I am afraid this you have found a bug. I am attaching a patched telerik.grid.min.js file.

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
Chris
Top achievements
Rank 1
answered on 07 May 2010, 04:02 PM
I tried this, but pressing enter in that field takes me to "/undefined". Could it be because I am using a custom route? It looks like this (and works perfectly otherwise):

            routes.MapRoute(
                "PaginatedAudit",
                "Audit/{page}/{size}/{orderBy}/{groupBy}/{filter}",
                new
                    {
                        controller = "Audit",
                        action = "Index",
                        page = 1,
                        size = 10,
                        orderBy = "Id-desc",
                        groupBy = "~",
                        filter = ""
                    }
            );

0
Atanas Korchev
Telerik team
answered on 11 May 2010, 10:51 AM
Hello Christopher,

I was able to reproduce the problem and indeed it was due to a bug with custom routes. Find attached a hotfix build which addresses that issue.

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
Chris
Top achievements
Rank 1
answered on 11 May 2010, 09:47 PM
This fixes it. Thank you for the quick turn-around. It is *VERY* much appreciated.
Tags
Grid
Asked by
Chris
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Chris
Top achievements
Rank 1
Share this question
or