c# - Changing all cell border widths in DataGridViews -


I have a data grid view and I want to make all cell boundaries thicker is there any property you can do ?

You need to do a little custom painting by adding code to cellpinning event handler To set the range of cells to anyone, use CellBorderStyle :

  dataGridView1.CellBorderStyle = DataGridViewCellBorderStyle.None; // Cell Planning Event Handler Grid for Your Data View1 Private Zero Data Grid View 1_CellPainting (Object Sender, Data Grid View Papping Avent ARG E) {If (E.RO Index == -1 & amp; E. Column Index & gt; - 1) {e.Handled = true; (Brush B = Using new solidbrushes (DataGrid View1.DefaultCellStyle.BackColor)) (using eGraphics.Filrextengle (B, E. Sailbones);} (Pen P = New Pen (Brush Black)) {p.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash; e.Graphics.DrawLine (P, New Point (0, E. Selbond.bottom-1), New Point (E. Sailboaks. Wright, E. CallBoongs. Bottom-1));} E.PaintContent (e.ClipBounds);}}    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -