Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><em>Assuming</em> that you want to have <strong>two links</strong> in a Single Cell named <strong>Edit / Delete</strong>, then I think you should should create a custom column type with a custom cell type that contains two LinkLabels.</p> <p>More <a href="http://social.msdn.microsoft.com/forums/en-US/winformsdesigner/thread/c28399bb-9d50-4a1e-b671-3dbaebb5cc69/" rel="nofollow noreferrer">here</a> on multiple controls in a single datagrid view cell [with source code].</p> <p><strong>[Solution 1 - <em>Merged</em> Header]</strong></p> <p>You need not merge the columns, rather merge the headers - like <a href="http://i.imagehost.org/0196/s3.gif" rel="nofollow noreferrer">this</a>. And then, please refer the solution in <a href="https://stackoverflow.com/a/1937719/763026">the related SO post</a>. This should solve your issue.</p> <p><strong>[Solution 2 - <em>Merged</em> Column]</strong> You can host multiple controls in a single data grid view cell and that is what you want to achieve. Create a winforms <strong>user control with two link labels</strong> and host that user control in the datagridview cell. So you will have Edit/Delete in a single cell <em>[what you are referring as merged column</em>]. See here for hosting custom controls in a datagrid view cell - <a href="http://msdn.microsoft.com/en-us/library/7tas5c80.aspx?PHPSESSID=o1fb21liejulfgrptbmi9dec92" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/7tas5c80.aspx?PHPSESSID=o1fb21liejulfgrptbmi9dec92</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload