Make cells visible DataGridView WinForms C?

Having a cell set as invisible will still render a rectangle in that location, white over white or black over whatever other combination of back/fore ground colors, you will still see at least a "hole" in the grid. I don't know a specific way to do it with any grid, setting the cell as read only and clearing the content should help enough, if you really need other things eventually your grid is not well thought for the use you are doing of it, aka should have less rows or columns or should be changed in having multiple smaller grids in the page.

– Akshay J Jun 15 at 15:20 so you want a hole! :-P – Davide Piras Jun 15 at 15:20 yes a hole, is it possible? – Akshay J Jun 15 at 15:22.

At first, I don't think such thing is possible, you can make row or columns invisible. The Visible property for cell is readonly and can't be changed in DataGridView, but a guy here points out to a custom implementation shown here (no source code provided), essentially what he does is disable the cell and override the OnPaint method of DataGridViewCell.

– Akshay J Jun 15 at 15:32 The author didn't provided the source, but pointed out what he did, make cell disabled and then override the OnPaint method – james_bond Jun 15 at 15:54 From the author: "The solution is to make my own SparseDataGridViewCell, derived from DataGridViewTextBoxCell and override OnClick and Paint. OnClick is for disabling the Mouse and Paint must NOT paint all kinds of things but background and border." – james_bond Jun 15 at 15:56.

I don't think this is possible. I don't know what you've tried already, have a look through msdn.microsoft.com/en-us/library/system.... and see if any of the properties could be used as a workaround, particularly the Style property. Have a look through, msdn.microsoft.com/en-us/library/system.... setting the font color to the same value as the background good enough?

That's ReadOnly! MSDN :Gets a value indicating whether the cell is in a row or column that has been hidden. – Akshay J Jun 15 at 15:17 read it first before sending... it says: "Gets a value indicating whether the cell is in a row or column that has been hidden."

Not exactly what he needs. – Davide Piras Jun 15 at 15:18 1 Silly me. I'll update with other suggestions!

– Connell Watkins Jun 15 at 15:18.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions