How can I set the VISIBILITY of checkboxes in a DataGridView?

Spideregg 140 Reputation points
2023-09-13T07:32:47.0066667+00:00

When I uncheck the checkbox, the visibility of other checkboxes disappears,Etc

未命名绘图.drawio

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,884 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,853 questions
0 comments No comments
{count} votes

Accepted answer
  1. Jiale Xue - MSFT 44,516 Reputation points Microsoft Vendor
    2023-09-13T08:21:53.8+00:00

    Hi @Spideregg , Welcome to Microsoft Q&A,

    In fact, you cannot modify the visibility of individual cells.

    DataGridViewCell.Visible Property is a readable property and cannot be set.

    You can set the visibility of individual rows and columns.

    I recommend that you replace it with modifying the cell to have a null value or modifying it to readonly.

    Best Regards,

    Jiale


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.