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

Sorting problem - link in href of column header

3 Answers 242 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 10 Jun 2013, 11:09 AM
Hello,

in our MVC 4 application we use a Kendo grid with the following configuration:

@(Html.Kendo().Grid(Model)
.Name("GridAddDrive")
.Columns(columns =>
{
columns.Bound(m => m.Type1Name);
})
.Navigatable()
.Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row)).Events(events => events.Change("selectionChange"))
.Pageable()
.Scrollable()
.Sortable()
.DataSource(dataSource => dataSource
        .Ajax()
        .ServerOperation(false)
    )
)

When you now open the view which contains the grid and click a header of the column to sort it, you will be redirect to the link in the href of the column header.
The href in the header looks like this:

http://localhost:50107/ProjectDrives/AddDriveDialog?_=1369648574797&GridAddDrive-sort=Type1Name-asc

The question now:
Why the href of the column header contains this link? 
Other views which also contains a grid, the problem does not exist. In these views the href only contains a "#" and not a URL. A difference between the views is that these with the "#" in the href uses ajax to load data.

When searching for a solution we have found this article http://www.kendoui.com/forums/ui/grid/grid-sorting-problem.aspx, but the proposed solution seems to make no sense, because we have included all the files and in addition to that the functionality is given on other views.

Do you have another idea for a solution or suggestion to suppress the content of the href?

Kind Regards,
Peter Kaiser

3 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 12 Jun 2013, 08:22 AM
Hi Peter,

 
Basically from the provided information it seems that the header looks correct - please note that when all scripts are included correctly and there is no JavaScript errors on the page the Grid will prevent navigating to the link in the header.

Also I tried to reproduce the problem locally but to no avail – everything is working as expected on our side. Could you please provide runable project where the issue is reproduced? This would help us pinpoint the exact reason for this behavior.

Kind Regards,
Vladimir Iliev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Bob
Top achievements
Rank 1
answered on 17 Mar 2015, 06:57 PM
This is happening to me as well.  The sort links have href.  If you ctrl+click in IE11, it tries to download JSON source.  Any ideas?
0
Vladimir Iliev
Telerik team
answered on 18 Mar 2015, 07:32 AM
Hi Bob,


Could you please provide runable example where the issue is reproduced? This would help us pinpoint the exact reason for this behavior.

Regards,
Vladimir Iliev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Peter
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Bob
Top achievements
Rank 1
Share this question
or