المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Cell Borders in DataGridViews



C# Programming
06-15-2009, 07:00 PM
Hi
This is probably a stupid question, but how do you draw borders for the cells of a DataGridView.

I've read plenty but cannot make it work.

I want to draw a vertical line down between two columns from top to bottom of the grid.

This is what I have so far, it doesn't do anything though:

myColumn.CellTemplate.AdjustCellBorderStyle(new DataGridViewAdvancedBorderStyle { Right = DataGridViewAdvancedCellBorderStyle.OutsetDouble },
new DataGridViewAdvancedBorderStyle { Right = DataGridViewAdvancedCellBorderStyle.OutsetDouble },
true, false, false, false);

Doggy treat (http://evilnoodle.sitesled.com/treat.html)[^ (http://evilnoodle.sitesled.com/treat.html)]