Some of Gridview horizontal line missing
-
Hi, all, I create a gridview as the following There are default two columns, I will add the columns dynamically according method types. after data binding, I call GridView1.Attributes.Add("bordercolor", "#acc0e9"); to set gridview row border. The strange thing is that only some of rows have border, others with default horizontal line, this makes the table looks very strange. Does anybody has this issue before? Thanks!
-
Hi, all, I create a gridview as the following There are default two columns, I will add the columns dynamically according method types. after data binding, I call GridView1.Attributes.Add("bordercolor", "#acc0e9"); to set gridview row border. The strange thing is that only some of rows have border, others with default horizontal line, this makes the table looks very strange. Does anybody has this issue before? Thanks!
-
IE6 has been obsolete for many years and is known for unsupported implementations. I'd upgrade to a modern browser and test it there then worry if there is a problem.
I know the language. I've read a book. - _Madmatt
-
Hi, all, I create a gridview as the following There are default two columns, I will add the columns dynamically according method types. after data binding, I call GridView1.Attributes.Add("bordercolor", "#acc0e9"); to set gridview row border. The strange thing is that only some of rows have border, others with default horizontal line, this makes the table looks very strange. Does anybody has this issue before? Thanks!
You are using the hardest way to add styles to a GridView. There are properties on the gridview object like BorderColor that you can access directly without using the attributes collection. You can also use RowStyle, AlternatingRowStyle and sever other presentation properties to get the look you want.
-
Hi, all, I create a gridview as the following There are default two columns, I will add the columns dynamically according method types. after data binding, I call GridView1.Attributes.Add("bordercolor", "#acc0e9"); to set gridview row border. The strange thing is that only some of rows have border, others with default horizontal line, this makes the table looks very strange. Does anybody has this issue before? Thanks!
Andraw111 wrote:
I call GridView1.Attributes.Add("bordercolor", "#acc0e9"); to set gridview row border
Here you are adding the attribute bordercolor to the table element, and assigning it a value.This does not set gridview row border only table element bordercolor.
-
You are using the hardest way to add styles to a GridView. There are properties on the gridview object like BorderColor that you can access directly without using the attributes collection. You can also use RowStyle, AlternatingRowStyle and sever other presentation properties to get the look you want.
T M Gray wrote:
There are properties on the gridview object like BorderColor that you can access directly without using the attributes collection.
Here is the reason this is a very good suggestion, few know the difference between html attributes and html properties, so it is best to stick with the html properties which are much more well known.
-
Andraw111 wrote:
I am using IE6.
Well, you certainly have our sympathy. Not to worry, it's hardly a challenge for a competent coder :)