CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: Date Entered: 12/10/2007 9:25:42 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 2 Views: 53 Favorited: 0 Favorite
3 Items, 1 Pages 1 |< << Go >> >|
"[email protected]
NewsGroup User
Alligning a Grid View in Master Page12/10/2007 9:25:42 PM

0

I have a very simple problem. I have a couple of  ASP.NET 2.0 pages that are based on the same Master Page. each page displays a Gridview in the content placeholder. I simply want the the top of the top left of the gridview to align with the top left of the content placeholder area. How can I do this?

I tried to put the gridview inside a Table like so.

<table id="TABLE1" style="left: 0px; vertical-align: top; width: 400px; position: relative; top: -6px" language="javascript" onclick="return TABLE1_onclick()" runat="server">

<tr>

<td style="width: 47px">

</td>

<td>

<asp:GridView ID="GridView1" runat="server" AllowSorting="True"

AutoGenerateColumns="False" DataSourceID="SqlDataSource1" Style="position:relative; vertical-align: top" DataKeyNames="ID" HorizontalAlign="Left">

Everything looks fine from within VS 2005 but when I bring up the page in a browser the gridview starts about halfway down the page. What am I doing wrong? 

"camera" <>
NewsGroup User
Re: Alligning a Grid View in Master Page12/11/2007 12:28:42 AM

0

 Hi your markup shows two cells in one row and the gridview in the second column.

I'm guessing there's something else in that 47px column that is long?  If so the grid (if it is short) will be placed in the middle of the cell.

Try this:

 

<tr>

<td style="width: 47px">

</td>

<td valign="top">

<asp: GridView... 


Vine Type: Content Management with Standards in Mind. http://vinetype.com
"Amanda Wang -
NewsGroup User
Re: Alligning a Grid View in Master Page12/12/2007 8:17:08 AM

0

Hi,

I simply want the the top of the top left of the gridview to align with the top left of the content placeholder area. How can I do this?

From the code we can see, you put the gridview in a td of a table, you can set the td's valign and align are top and left.

for example:

<td align="left" valign="top">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1">

 

Or you also set the td that the contentplaceholder is in, set the td's valign and align are top and left. Then the content page will show its position is to the top left of the content placeholder area.

For example:

<td align="left" style="width: 100px; height: 248px" valign="top">
        <asp:contentplaceholder id="ContentPlaceHolder1" runat="server">
        </asp:contentplaceholder>
                </td>

 

Hope it helps.


Please remember to mark the replies as answers if they help and unmark them if they provide no help.


Yours sincerely,
Amanda Wang
Microsoft Online Community Support
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:













i have 10 categories

server side script block doesn't run

conditional sql question

static methods in c#

dropdownlist problem

displaying data from table in list

hyperlink for text in user controls

could not find updatepanel

how do i include one page inside another?

asp and asp.net?

subscription payment method

does webclient.downloadstring support unicode characters ?

time

how to make custom deserialization.

full view text in dropdownlist

how to make random unique numbers?

find the application path

stil need help with vbc please

dll of charts as a freeware

asp.net and msde ?

version asp

form text input >> .eps vector output

when shall we create an object of a class

need help again

referencing the web site root

asp in asp.net environment

email

redirect to new web site

reporting options...

use of java/j2ee and asp/.net

how does an asp.net control work at the client.

how to output texts directly to browser?

multiview and wizard controls page_load problem

methods with type arguments

really simple question

read trust level in code ?

how can i modify div1.style at pageload?

hitscounter

help with using response.write to do a window.open

adding a reference to a project using the "browse" tab...

failure sending mail

page_load

databinding, access to datasource

web server is not running asp.net version 1.1?

loopy loop!

force refresh a page

dynamic radio buttons - help

value of asp:label in sql query

problems with sending an email with asp.net

debugging with firefox

   
  Privacy | Contact Us
All Times Are GMT