Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / December 2007

Tip: Looking for answers? Try searching our database.

[ GridView ]  three little style cases

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
teo - 21 Dec 2007 23:35 GMT
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?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.