473,386 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Setting A Datagrid Cell Border At Runtime

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
Aug 7 '08 #1
2 1862
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

On Aug 7, 10:14 am, Iain Wilson <Email.IainWil...@gmail.comwrote:
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
Aug 7 '08 #2
On Aug 7, 10:14*am, Iain Wilson <Email.IainWil...@gmail.comwrote:
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
Aug 7 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Gilles T. | last post by:
How I can get element ID in the edit mode of datagrid control? If I not in the edit mode, there are no problem. <asp:TemplateColumn ItemStyle-CssClass="grid_column_width_3"...
8
by: Gilles T. | last post by:
How I can get element ID in the edit mode of datagrid control? If I not in the edit mode, there are no problem. <asp:TemplateColumn ItemStyle-CssClass="grid_column_width_3"...
8
by: Gilles T. | last post by:
How I can get element ID in the edit mode of datagrid control? If I not in the edit mode, there are no problem. <asp:TemplateColumn ItemStyle-CssClass="grid_column_width_3"...
0
by: Iain Wilson | last post by:
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.