About cellIndex property on the grid with locked columns

4 posts, 1 answers
  1. Kiriya
    Kiriya avatar
    10 posts
    Member since:
    Jul 2015

    Posted 30 Oct Link to this post

    Hi,

    I use cellIndex property on the grid. But it returns strange value when the grid has locked columns.

    I tried the propety on the Frozen columns demo page using Google Chrome Developer Tools.

    1. When I click "Order ID" cell at the first row and input $("#grid").data("kendoGrid").cellIndex($0) to the console, it returns 2.
    2. When I click "Ship Name" cell at the first row and input $("#grid").data("kendoGrid").cellIndex($0) to the console, it returns 3.
    3. When I click "Ship Country" cell at the first row and input $("#grid").data("kendoGrid").cellIndex($0) to the console, it returns 2.
    4. When I click "Ship City" cell at the first row and input $("#grid").data("kendoGrid").cellIndex($0) to the console, it returns 3.
    5. When I click "ShipAddress" cell at the first row and input $("#grid").data("kendoGrid").cellIndex($0) to the console, it returns 4.

    I expect in above case 1 cellIndex returns 0, and in case 2 cellIndex returns 1.

    Is this the correct behavior of cellIndex property?

    When I click "Ship Name" cell at the first row and input $("#grid").data("kendoGrid").cellIndex($0) to the console, it returns 3.
    When I click "Ship Name" cell at the first row and input $("#grid").data("kendoGrid").cellIndex($0) to the console, it returns 3.
  2. Kiriya
    Kiriya avatar
    10 posts
    Member since:
    Jul 2015

    Posted 30 Oct in reply to Kiriya Link to this post

    I also tried to change groupable property to false at Dojo.

    But the result didn't change.

  3. Kendo UI is VS 2017 Ready
  4. Answer
    Dimiter Topalov
    Admin
    Dimiter Topalov avatar
    349 posts

    Posted 01 Nov Link to this post

    Hi Kiriya,

    Thank you for bringing this issue to our attention. Your observations are correct. The issue is caused by the fact that when there are locked columns, the argument, passed to the cellIndex() method, should be wrapped in a jQuery object, e.g. ...cellIndex($($0)).

    The documentation for the cellIndex() method will be upgraded accordingly.

    Regards,
    Dimiter Topalov
    Telerik by Progress
    Build rich, delightful, *native* Angular 2 apps with Kendo UI for Angular 2. Try it out today! Kendo UI for Angular 2 (currently in beta) is a jQuery-free toolset, written in TypeScript, designed from the ground up to offer true, native Angular 2 components.
  5. Kiriya
    Kiriya avatar
    10 posts
    Member since:
    Jul 2015

    Posted 01 Nov Link to this post

    Thanks for your reply. I implemented the workaround and solved this issue.

    But when I clicked the "Mark as answered" hyperlink, http 500 error occurred.

    So I can't mark my question as answered.

Back to Top
Kendo UI is VS 2017 Ready