Sorting problem - link in href of column header

4 posts, 0 answers
  1. Peter
    Peter avatar
    1 posts
    Member since:
    Sep 2011

    Posted 10 Jun 2013 Link to this post

    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
  2. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2196 posts

    Posted 12 Jun 2013 Link to this post

    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!
  3. Bob
    Bob avatar
    123 posts
    Member since:
    Sep 2012

    Posted 17 Mar 2015 in reply to Vladimir Iliev Link to this post

    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?
  4. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2196 posts

    Posted 18 Mar 2015 Link to this post

    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.

     
Back to Top