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

[Solved] Refresh button wrong url

2 Answers 103 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.
Tim
Top achievements
Rank 1
Tim asked on 02 Feb 2011, 05:54 AM
We have a grid which is bound using the following:
.Grid(Model.Profiles.Where(s => s.Description != ReportConfigurationViewModel.DefaultProfile)),
{ column definitions.... }
.Sortable(s => s.OrderBy(c => c.Add(t => t.Description)))
.Pageable(page => page.PageSize(15))
.Footer(true)
.Render();


The trouble is that the refresh button/link is showing the wrong url to refresh the page. It's got the right controller and action, but the querystring is pointing to what seems to be a fixed value. It is the same for every page that uses the grid - wrong link address.

We have a custom
GridPageWrapperHtmlBuilder

 which builds the refresh link as follows:

var urlBuilder = new GridUrlBuilder(grid);
var refreshBuilder = new MyGridRefreshHtmlBuilder<T>(grid,urlBuilder.Url(grid.Server.Select));
refreshBuilder.Build().AppendTo(parent);

Can anyone explain why we'd be getting the wrong link on the refresh button? All other grids look the same, use the same code, and work perfectly. 'Grid.Server.Select' has nothing in it that references the file, in fact it returns null.


2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 02 Feb 2011, 09:08 AM
Hello Tim,

 The refresh button URL is correct only during server binding. If you are using Ajax binding JavaScript is used to trigger the refresh of the grid. Otherwise the refresh button uses the same URL as the latest request. If this is not the case you can submit a sample application which shows what you are currently observing. We will review it and get back with a solution.

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
paul
Top achievements
Rank 1
answered on 08 Jun 2013, 07:23 AM
Hello Atanas,
I am a newbie in this field, wanted to ask what exactly the refresh button does?
logically should it not clear the filter if one is applied?

thanks,
Paul
Tags
Grid
Asked by
Tim
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
paul
Top achievements
Rank 1
Share this question
or