Home > Software engineering >  How to edit after datagridview merge cells
How to edit after datagridview merge cells

Time:09-25

Everybody is good:

Have a question about datagridview ask:

If more than one cell of the same line, cellpainting finished re-paint, data can also be in the merged cells in the center of the display;

But how to edit? Because when click, or will be selected to merge cells in a cell? Should be rewritten cell_click? Obtain cell_doubleclick??

On the Internet to find a circle and only merge operation, not how to edit after merger, don't know whether there are related cases,

Thank you very much!

CodePudding user response:

Is the interface provided by the merge operation?
If is the editor should also can be normal,
Controls, such as the MFC cells provide start editing and end edit response message, or inside the Notify messages about start editing and end edit notification
You in the direction of the two to see if there are any more related messages defined interfaces or notification codes

CodePudding user response:

reference 1st floor jianwen0529 response:
is the interface provided by the merge operation?
If is the editor should also can be normal,
Controls, such as the MFC cells provide start editing and end edit response message, or inside the Notify messages about start editing and end edit notification
You in the direction of the two to see if there are any more related messages defined interfaces or inform the code


Hello, thank you for your reply, is the fact that the datagridview itself does not support the merger, consolidation, cell or redraw it seems as if the combined box, actually there is a cell, just no borders, but when he click will point to the cell, it is more troublesome,

CodePudding user response:

refer to the second floor gg1234 response:
Quote: refer to 1st floor jianwen0529 response:

Is the interface provided by the merge operation?
If is the editor should also can be normal,
Controls, such as the MFC cells provide start editing and end edit response message, or inside the Notify messages about start editing and end edit notification
You in the direction of the two to see if there are any more related messages defined interfaces or inform the code


Hello, thank you for your reply, is the fact that the datagridview itself does not support the merger, consolidation, cell or redraw it seems as if the combined box, actually there is a cell, just no borders, but when he click will point to the cell, it is more trouble.

The effect of the control itself is mapped
Itself does not support the merger, the merged function expansion of it you? So when you do the function must also be opted for (and mouse click events) code logic for the corresponding modification,
If this control doesn't work or what do you think of expansion of merge function too much trouble, then you can look for the third party has combined control using cell function
  • Related