C1FlexGrid RowHeaders and ColHeaders merge issue

Posted by: anildabral3k on 22 March 2018, 4:51 pm EST

    • Post Options:
    • Link

    Posted 22 March 2018, 4:51 pm EST

    Hi

    Is there a way to merge column headers horizontally and not vertically. And merge row headers vertically but not horizontally?

    Please check my screenshots one with col.headers merge issue and another with row.headers merge issue.

    Also note that screenshot data is just a sample data. I can have any other row/col headers text than what is in the screenshot.

    Kindly provide sample code that can resolve this issue.

    Thanks,

  • Posted 27 March 2018, 5:40 am EST

    Hello Anil,

    Apologies for taking time in responding to you.

    Regarding merging row headers vertically and column headers horizontally, setting C1FlexGrid’s AllowMerging property to ColumnHeaders, RowHeaders and setting the AllowMerging property of Columns in RowHeaders and similarly for rows in ColumnHeaders, to true, the headers seem to be getting merged just like you wish to have them.```

    _flexGrid.AllowMerging = AllowMerging.ColumnHeaders| AllowMerging.RowHeaders;

    _flexGrid.RowHeaders.Columns.Add(_flexGrid.Columns[“Continent”]);

    _flexGrid.RowHeaders.Columns.Add(_flexGrid.Columns[“Country”]);

    _flexGrid.RowHeaders.Columns[1].AllowMerging = true;

    _flexGrid.RowHeaders.Columns[2].AllowMerging = true;

    Row r = new Row();

    _flexGrid.ColumnHeaders.Rows.Insert(1, r);

    _flexGrid.ColumnHeaders.Rows[0].AllowMerging = true;

    _flexGrid.ColumnHeaders.Rows[1].AllowMerging = true;

    
    Regards,
    Ruchir Agarwal
    [zip filename="C1FlexGridMerge.zip"]https://gccontent.blob.core.windows.net/forum-uploads/file-39ec6412-83a4-4dca-a4fd-1e12e7328a23.zip[/zip]
  • Posted 1 April 2018, 1:48 pm EST

    Hi Ruchir,

    Sorry for the late response.

    Your solution worked perfectly.

    Thank you.

    Anil

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels