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
415
CellMerging apply on certain columns only
posted

I have a grid (attached screenshot) where I am using 

{
name: "CellMerging",
initialState: "merged"
}

I want this feature to apply on certain columns only, not entire grid. How do I achieve this? I am using 2015.1 version. Also I am not able to get event "cellsMerged" as mentioned at "http://ko.infragistics.com/community/forums/p/96161/474977.aspx#474977". When I put a debugger, it never hits that. Is it the version I am using is wrong?

Please suggest.

Parents
  • 1235
    posted

    Hello Sarojanand,

    This functionality can be achieved by removing the class, applying the style to a merged cell from every column, that should not have its cells merged. This class is called "ui-iggrid-mergedcell". You can access every cell of a column with the following query:


    $("td[aria-describedby='<gridID>_<columnKey>']");

    For example:


    {
        name: "CellMerging",
        initialState: "merged",
        cellsMerged: function(evt, ui) {
            $("td[aria-describedby='grid1_ProductDescription']").removeClass("ui-iggrid-mergedcell");
            $("td[aria-describedby='grid1_UnitsInStock']").removeClass("ui-iggrid-mergedcell");
        }
        //where grid1 is the grid's ID and ProductDescription and UnitsInStock are columnkeys.
    }

    I have attached a sample, demonstrating how this is done.

    Please feel free to contact me if you have further questions.

    Regards,
    Ivaylo Hubenov
    Entry-level developer

    cellMerging.zip
Reply Children
No Data