Link to home
Start Free TrialLog in
Avatar of Pizpot
Pizpot

asked on

datagridview hide checkbox?

I have a datagridview checkbox column. How do I make some of them invisible? Alternatively, how do I only make specific cells checkbox?

I want a checkbox column with some cells looking empty. I already have those rows read-only.
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

To hide a datagridview-column

        DataGridView1.AutoGenerateColumns = True;
        DataGridView1.DataSource = ds;
        DataGridView1.DataMember = "TableName";
        //DataGridView1.DataMember = ds.Tables[0].TableName;

        DataGridView1.Columns[0].Visible = False;
Avatar of Pizpot
Pizpot

ASKER

I bet you could draw over the checkboxes!?!
Can you please clarify your previous comment (and the reason why it should be accepted !)
Avatar of Pizpot

ASKER

Yes. A possible solution would be to draw an area of pixels over the checkboxes, and make them read-only so that they do nothing and are invisible.

The suggestion in the 2nd post, to make the whole column invisible does not answer the question. Not every row, just some!
ASKER CERTIFIED SOLUTION
Avatar of Pizpot
Pizpot

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Closed, 300 points refunded.
Vee_Mod
Community Support Moderator