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
500
Change css of the child grid
posted

Hi Team,

I am implementing the hierarchical grid which can go on till 3-4 levels. I want to differentiate the child grid by putting a different css when I expand the parent node.

1) The different css could be changing the background color of the header of child grid.

2) Applying change in css according to cell text only to parent grid and not to child grid. For example: If status is deleted, highlight only parent row and not child row.

Please help me out with this issue.

-Regards,

Agraj

  • 15320
    Offline posted

    Hello Agraj,

    You may change the background color of the child grid header on childGridCreated event using the reference to the current created child grid DOM element, for instance:
    $(document).delegate("#hierarchicalGrid", "igchildgridcreated", function (evt, ui) {
     ui.element.find("thead tr th").css("background-color", "blue")
    });


    Regarding your second requirement, please note that when you delete a row using grid Updating feature, by default the deleted record gets crossed and the text gets italic font style. I'm attaching a sample with similar scenario for your reference. If you need further assistance, please let me know.

    Regards,

    Tsanna



    igHierarchicalGridStyles.zip