Change the cell border width and also make the cell border only all,left ,right,top,bottom or none in winform datagridview. In datagridview the problem is to change the border style of each cell , as we could do in excel sheet. I have tried following but it didnt work.
DataGridViewAdvancedBorderStyle mystyle = new DataGridViewAdvancedBorderStyle ();
DataGridViewAdvancedBorderStyle myplaceholder = new DataGridViewAdvancedBorderStyle ();
mystyle.Top =DataGridViewAdvancedCellBorderStyle.None;
dataGridView1.Rows[1].Cells[1].AdjustCellBorderStyle开发者_高级运维(mystyle, myplaceholder, true, true, true, true);
That's not how it works. It is a virtual method, you're supposed to override it in your own custom DataGridViewCell derived class. And the DataGridView would have to be filled with those custom cells.
精彩评论