Grid.hideColumn method while the grid is not shown

6 posts, 0 answers
  1. Philippe
    Philippe avatar
    6 posts
    Member since:
    May 2013

    Posted 06 Jan 2015 Link to this post

    Hello,

    Here is a short description about how we use KendoUI grid in our project :
    - An http request is made from the browser to the server to get a JSON object that contains the grid structure (datatype, name, etc...)
    - The grid is dynamically built with the JSON object content
    - Some column must be hidden just after the grid construction, so, we use databound event :

    dataBound : function() {
     
    [...]
     
    for (var i = 0; i < as_ColumnsToHide.length; i++) {
                    ao_Grid.hideColumn(as_ColumnsToHide[i]);
                }
     
    [...]
     
    }

    When this code is processed, the grid is not visible as it is in a tabstrip component from Telerik ASP.NET Ajax.
    An error is raised from hideColumn() method after this "filter" directive :

    cell = leafDataCells(container).filter(":visible").eq(headerCellIndex);
    cell[0].style.display = "none";

    cell[0].style is undefined because the filter method return 0 element.

    Could you please see if there is a simple workaround in my situation ?
    Regards.

  2. Philippe
    Philippe avatar
    6 posts
    Member since:
    May 2013

    Posted 06 Jan 2015 in reply to Philippe Link to this post

    Note that this error is raised since we have upgraded to the latest available kendoUI version (v2014.3.1119)
  3. Kendo UI is VS 2017 Ready
  4. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 06 Jan 2015 Link to this post

    Hello Philippe,

    The described problem was fixed shortly after the 2014.3.1119 release. Please use the latest internal Kendo UI build.

    Regards,
    Dimo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. Philippe
    Philippe avatar
    6 posts
    Member since:
    May 2013

    Posted 08 Jan 2015 Link to this post

    Hi,

    Thank you for the information, problem is solved with the latest internal build

    Regards.
  6. Evgeniy
    Evgeniy avatar
    1 posts
    Member since:
    Jun 2016

    Posted 30 Jun Link to this post

    Hi guys,

    I use Kendo v.2016.2.504.

    I get the same error when I try show/hide column.

    I will see error in attachments.

    Please advise.

     

  7. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 04 Jul Link to this post

    Hi Evgeniy,

    The following example uses Kendo UI 2016.2.504 and works as expected. Am I missing something? Please verify that you are using the specified version.

    http://dojo.telerik.com/ETipu

    Regards,
    Dimo
    Telerik
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Back to Top
Kendo UI is VS 2017 Ready