grid.hideColumn hides correct header but incorrect data

10 posts, 0 answers
  1. Jark Monster
    Jark Monster avatar
    46 posts
    Member since:
    Jan 2012

    Posted 01 Feb 2013 Link to this post

    I have a grid that I toggle the visibility of a column on when a button is pushed.

    It hides the column header just fine, but with the data it hides is one column to the left.

    I'm hiding the column NMFC, and when that is hidden, the NMFC column header disappears.

    However, the data under the Weight column ("lbs") is the data that is hidden and the value under NMFC ("test") is now visible underneath the Weight column.

    Here's the code for the columns:
    columns.Bound(i => i.WeightUOM)
        .EditorTemplateName("ItemGrid_RefUOMListingWeight")
        .Width(50);
    columns.Bound(i => i.NMFC).Width(50);
    Here's the script code:
    var itemGrid = $("#QuoteItemGrid").data("kendoGrid");
    itemGrid.hideColumn("NMFC");
    I am using a detail template on this grid, so maybe it is throwing the index off by one?  Not sure, but any tip would be helpful.  I can provide more code if needed.  I thought I would try and keep it simple for this first post and only put critical code in.

    Thanks!
  2. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2284 posts

    Posted 05 Feb 2013 Link to this post

    Hi Mark,

     
    I tried to reproduce this issue locally and in our demos, but to no avail. Could you provide us a working project so we could replicate the mentioned behavior and provide you a further assistance?

    Greetings,
    Dimiter Madjarov
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Chad
    Chad avatar
    29 posts
    Member since:
    Nov 2012

    Posted 09 Feb 2013 Link to this post

    I'm having the same issue....hideColumn hides just the header cell of the table and not the whole column. I will see about creating a small runnable project...but just wanted to let you guys know that I am having the same issue.
  4. Chad
    Chad avatar
    29 posts
    Member since:
    Nov 2012

    Posted 10 Feb 2013 Link to this post

    I have a runnable project, but I did find what scenario specifically causes it, at least in my case:
    • this happens when you try to hide a column that is to the right of an editable column in an InCell, batch editable grid.
    • whenever attempting to hide a column to the right of the editable column, only the header cell is hidden and not the remainder of the column
    • hiding a column to the left of the editable column works as expected
    • hiding the editable column as well as the desired column to the right of the editable column also works as expected
    The project is larger than 2MB so I am submitting this via a support ticket.
  5. Dimiter Madjarov
    Admin
    Dimiter Madjarov avatar
    2284 posts

    Posted 12 Feb 2013 Link to this post

    Hello Mark,

    I am still unable to reproduce the issue that you are describing. For your convenience I am attaching a sample project and also a short screen capture of my attempt.

    Please let me know if this covers your scenario. If this is not the case, please edit the sample project to reproduce the issue and send it back to me.
     

    All the best,
    Dimiter Madjarov
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Chad
    Chad avatar
    29 posts
    Member since:
    Nov 2012

    Posted 12 Feb 2013 Link to this post

    I posted this issue as a support ticket and the answer was that this has been fixed in the latest internal build. You can real the release notes here.

    "Grid content not aligned properly after columnHide action"
  7. Chad
    Chad avatar
    29 posts
    Member since:
    Nov 2012

    Posted 13 Feb 2013 Link to this post

    I upgraded and can confirm this is fixed in the newest internal build.
  8. Jark Monster
    Jark Monster avatar
    46 posts
    Member since:
    Jan 2012

    Posted 22 Feb 2013 Link to this post

    My apologies for dropping off the face of the Earth.  I've been out of the office for a while.  I think that obtaining the latest internal build will resolve my issue, but I've been unable to find it.

    I have tried going to the Downloads page while logged in, but everything I try to download is the version I have (2012.3.1315), but the release notes posted by Chad refer to 2012.3.1412 as latest.

    Do I need to open a support ticket to have the latest internal build sent to me or is there another way?

    Thanks Dimiter and Chad!
  9. Chad
    Chad avatar
    29 posts
    Member since:
    Nov 2012

    Posted 22 Feb 2013 Link to this post

    Next to your available downloades, to the right of the "Download Installer" button you will see a link for "Download also: Latest Internal Builds". Click that link.
  10. Jark Monster
    Jark Monster avatar
    46 posts
    Member since:
    Jan 2012

    Posted 25 Feb 2013 Link to this post

    I was looking in the Downloads area for everyone and not in the Downloads area on my profile.  My bad.

    I updated and verified that this resolves the issue for me as well.

    Thanks everyone!
Back to Top