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
280
Preventing selection of merged cell
posted

How to prevent selection of the merged cell, the one that is empty. Or simplier,  how to identify that the cell is merged and empty within say, BeforeSelectChange?

  • 469350
    Offline posted

    Hi,

    I'm not exactly sure what you mean by "empty". But you can detect if a cell is merged by using the GetMergedCells method on the cell.

    e.NewSelections.Cells[0].GetMergedCells()

    This will return an array of cells, so you can tell if the cell is merged or solo.