Setting A Datagrid Cell Border At Runtime

  • Thread starter Thread starter Iain Wilson
  • Start date Start date
I

Iain Wilson

Hi All

I would like to set the width of the bottom line of a datagrid row at
runtime.

I know how to set the complete lines style color etc at runtime but I
cannot figure how to change the line.

eg

e.Item.BackColor = Color.Cornsilk;

Is it possible ?

Thanks in advance for any assistance offered

Iain
 
Is your grid a DataGridView? If so, are you referring to the
DividerHeight? If so, it is as simple as:

grid.Rows[x].DividerHeight = <int value> (in default units, mine is
pixels)

The one drawback is that it does not add to the height of the row (in
fact, it takes away from the height.) But you can independently
increase the height of that row.
Also, it takes on the color of the foreground color of the grid.

Hope this helps,
jake
 
Hi All

I would like to set the width of the bottom line of a datagrid row at
runtime.

I know how to set the complete lines style color etc at runtime but I
cannot figure how to change the line.

eg

e.Item.BackColor   = Color.Cornsilk;

Is it possible ?

Thanks in advance for any assistance offered

Iain

is this a win or a web app?
for a web app IIRC you can set the CSS style for each row if you need
to do so.
for a win app I do not know if you can do it
 
Back
Top