locked
Data Grid View Button Column Style RRS feed

  • Question

  • i'm using a data grid view to show some data. The style is configured so there is no border, or grid lines, or header styles. I would also like to add a button column. When doing this I select button flat appearance as flat, but I do not seem to be able to remove the border around the button, or even set it to the same as the background colour (white).

    Ideally I would like the button to have a small margin between it and the cell.

    You will not see this margin until you select the row; when the row is highlighted the button will remain white, but the cell back ground will change colour - if that makes sense!

    if anyone could point me in the right direction that would be most appreciated!

    Failing that is it possible to just add a standard button control to a cell?

    Tuesday, June 17, 2014 1:16 PM

Answers

  • Hello,

    The following project provides a custom button for a DataGridView which might provide ideas into custom painting but is not going to be correct to your requirements, only a starting point.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

    • Proposed as answer by Carl Cai Friday, June 27, 2014 7:19 AM
    • Marked as answer by Barry Wang Monday, June 30, 2014 9:42 AM
    Tuesday, June 17, 2014 1:36 PM