T
teo
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>
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>