Row merge is not working

Posted by: vikasbhutani on 13 January 2020, 5:25 pm EST

  • Posted 13 January 2020, 5:25 pm EST - Updated 30 September 2022, 3:04 am EST

    I am using spread-com product in c++

    I would like to merge the row based on similar cell value, but it not working for me

    I am using Farpoint spread 8.0 version

    m_grigCtrl.SetRow(2);

    m_grigCtrl.SetRow(3);

    m_grigCtrl.SetRowMerge(CFpspread1::MergeAlways);

    please tell me what is wrong in the above code?

    Thanks,

  • Posted 14 January 2020, 7:50 pm EST

    Hi Vikas,

    As mentioned over the S1 case 416212, can you please share a small sample demonstrating the problem? This would help me in investigating the issue further.

    ~Pragati

  • Posted 16 January 2020, 12:09 am EST

    Hi Pragati

    I am able to merge the column using functions such as:-

    m_grigCtrl.SetCol(3);

    m_grigCtrl.SetColMerge(CFpspread1::MergeAlways);

    But, when apply the function such as :-

    case 1:-

    m_grigCtrl.SetRow(2);

    m_grigCtrl.SetRow(3);

    m_grigCtrl.SetRowMerge(CFpspread1::MergeAlways);

    or

    Case 2:

    m_grigCtrl.SetRow(2);

    m_grigCtrl.SetRowMerge(CFpspread1::MergeAlways);

    m_grigCtrl.SetRow(3);

    m_grigCtrl.SetRowMerge(CFpspread1::MergeAlways);

    The rows with title “Inside Macintosh” are not merged and shared the screenshot already in my previous post with sample code.

    Thanks,

    Vikas

  • Posted 16 January 2020, 10:30 pm EST

    Hi Vikas,

    The RowMerge property sets or returns whether or how cells in a row that have the same content are grouped in a single cell spanning multiple columns. The behavior you are expecting here is column merging because the cells with text “Inside Macintosh” have the same content in a column.

    Documentation Links:

    https://help.grapecity.com/spread/Spread8/WebSiteHelp/webframe.html#prop641.html

    https://help.grapecity.com/spread/Spread8/WebSiteHelp/prop220.html#2055591

    Please refer the product sample “MergeSpan” which implements row and column merging correctly. You can find it here on your machine:

    C:\Program Files\FarPoint Technologies\Spread 8\Samples\ActiveX\VC.NET\MergeSpan

    ~Pragati

  • Posted 17 January 2020, 12:28 am EST

    hi Pragati,

    Thanks, I may be assumed row’s merge feature wrongly.

    So, Row’s merge is used to merge the same row who is having same values in its cell.

  • Posted 19 January 2020, 3:49 pm EST

    Yes, that’s correct.

Need extra support?

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

Learn More

Forum Channels