Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
3790
change column header text after load?
posted

I want to change the left most column header name to blank "", how could I go about doing that.

  • 23953
    Offline posted

    Hello Seang,

    Thank you for posting in the community.

    There is not API for doing that out of the box. You should use jQuery and manipulate the igGrid DOM tree.

    There are two ways to do that:

    The first uses the following code:

    $("#grid1").igGrid("headersTable").find('thead > tr:eq(0) > th:eq(0) > span.ui-iggrid-headertext').html("");

    This code finds the leftmost column header using the igGrid headersTable API.

    The second way uses the following code:

    $("#grid1_Name > span.ui-iggrid-headertext").html("");

    where #grid1_Name is the name of the th element and is constructed the following way:

    <grid_id>_<column_key>, where <grid_id> is the id of the grid placeholder and the <column_key> is the key of the column.

     

    Do not hesitate to  ask if you have any additional questions.

    Best regards,
    Martin Pavlov
    Infragistics, Inc.
    support@infragistics.com