I have set the background color for some cells to illustrate my question.


I know there is a way to make the background color fill the entire cell, but I have done it using this code instead.

IGrid1.Header.Cells(0, 4).BackColor = Color.Pink

What I would like instead, would be to remove the white space/padding that surrounds the pink part so I can reclaim that space, as my grid has a lot of columns and I would like to make it not as wide, and it all adds up.

There is no way I can find to do this. Is there something I am overlooking?
The problem is related to the system drawing of the column headers. If you do not turn off visual styles with the UseXPStyles property, the header bitmap comes from the OS and it has some indents we can't fill with the color. This problem is already solved in the next big update of iGrid known as iGrid X that will be released soon.

If you want to solve the problem in the current version, you can try to do what you need in the flat style or turn system drawing totally of with the DrawSystem property of the header.
OH a new version?

I'll just wait for that then! Thanks! I suppose that announcement up there tells me when it will be released?

Thanks again.
If you mean the post with iGrid.NET X announcement in this forum section - yes, it will inform you about the release. You can also get email notifications about updates in that topic (and any forum topic) using the 'Watch this topic' option in the Tools menu at the top.
This is somewhat related.

Using the IGButtonColumnManager, I put a some buttons in some cells, and that has increased the row height, which I was hoping to avoid, or at least minimize.

I was successfully able to reduce it a bit by changing the CELL_BUTTON_PADDING variable from 4 to 2, and that adjusts the space between the button text and the button border, but there is also some space between the cell border and the button border that I would like to reduce.


I have colored the cell background red to illustrate it. It is currently using a 2px padding (the red part) that i would like to reduce to 1px instead. Is there a way to do this?
Could you please provide us a small sample project with the problem? Also, do you work with version 6 or version X of the iGrid?

Have you tried to set the cell content indent (the ContentIndent property) to 0? Something like this:
IGrid1.Cols(0).CellStyle.ContentIndent = new iGIndent(0)
That did the trick. Setting ContentIndent was what I needed.

Thanks for helping me find these properties that I was not aware of. I did read the help file looking for something like this, but was not searching for the right term.