hallo,
I have three problemS about the style of a Gridview (Aspnet 2.0)
to try to solve (in the official way or by a workaround)
1)
how to remove the upper border of a cell (1,0) ;
it has no text;
here an image:
http://img184.imageshack.us/my.php?image=imageko3.gif
(5kb)
2)
hot to add a left padding (4 px) to an entire column ?
the only way I found is to cycle all the rows
For i as integer = 0 to ....
GridView1.Rows(i).Cells(0).Style("Padding") = 4
Next
I would have expected a sort of
Gridview1.Columns(0).ItemStyle.Padding = 4
but it doesn't exist
3)
how to set/force the height of a row ?
I have a row with text that wraps so I have two lines of text in it;
I need TO GAIN vertical space
so I tried all the three way below:
GridView1.rows(5).height=40
GridView1.Rows.Item(5).Style.Item("Height") = 40
GridView1.Rows(5).Cells(3).Height = 40
but with no effect
------------------
Here the aspx code of the GridView
<asp:GridView ID="GridView1" runat="server" Style="position:
relative" BorderStyle="Outset" AutoGenerateColumns="False">
<Columns>
<asp:TemplateField>
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%#
Bind("Data") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%#
Bind("Data") %>'></asp:Label>
</ItemTemplate>
teo - 21 Dec 2007 23:41 GMT
>1)
>how to remove the upper border of a cell (1,0) ;
>it has no text;
>here an image:
>http://img184.imageshack.us/my.php?image=imageko3.gif
>(5kb)
I forgot:
I tried
GridView1.Rows(3).Cells(3).Style("cellborder-top-style") = "none"
GridView1.Rows(3).Cells(3).Style("cellborder-top-style") = 0
with no effects
ThatsIT.net.au - 22 Dec 2007 16:37 GMT
>>1)
>>how to remove the upper border of a cell (1,0) ;
[quoted text clipped - 9 lines]
> GridView1.Rows(3).Cells(3).Style("cellborder-top-style") = 0
> with no effects
maybe try changing color to white or whatever your background is so it can
not be seen?
teo - 22 Dec 2007 18:07 GMT
>>>1)
>>>how to remove the upper border of a cell (1,0) ;
[quoted text clipped - 12 lines]
>maybe try changing color to white or whatever your background is so it can
>not be seen?
do you know the exact syntax?