positioning controls

Discussion in 'ASP .Net' started by =?Utf-8?B?UGF1bA==?=, May 31, 2005.

  1. still trying to figure out how to do this as I have a grid that gets data
    from a dbase and can change in size. I have controls that I always want to
    be just below the grid, with no gaps. This is a webform so thinking html may
    take care of it. When only a few items are returned to the grid I get,

    datagrid
    <<< gap, large blank space>>>>

    other controls.

    --
    Paul G
    Software engineer.
     
    =?Utf-8?B?UGF1bA==?=, May 31, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?UGF1bA==?=

    Tim McOwan Guest

    Usually VS.NET will put a datagrid inside a <P> tag if you look at the code
    view. If you get rid of both the opening and closing <P> and </P> then you
    will lose the gap.

    "Paul" <> wrote in message
    news:...
    > still trying to figure out how to do this as I have a grid that gets data
    > from a dbase and can change in size. I have controls that I always want
    > to
    > be just below the grid, with no gaps. This is a webform so thinking html
    > may
    > take care of it. When only a few items are returned to the grid I get,
    >
    > datagrid
    > <<< gap, large blank space>>>>
    >
    > other controls.
    >
    > --
    > Paul G
    > Software engineer.
     
    Tim McOwan, May 31, 2005
    #2
    1. Advertising

  3. Paul,

    Use Flow Layout.

    Eliyahu

    "Paul" <> wrote in message
    news:...
    > still trying to figure out how to do this as I have a grid that gets data
    > from a dbase and can change in size. I have controls that I always want

    to
    > be just below the grid, with no gaps. This is a webform so thinking html

    may
    > take care of it. When only a few items are returned to the grid I get,
    >
    > datagrid
    > <<< gap, large blank space>>>>
    >
    > other controls.
    >
    > --
    > Paul G
    > Software engineer.
     
    Eliyahu Goldin, May 31, 2005
    #3
  4. In short, you should set the pageLayout property to FlowLayout instead of
    GridLayout.

    Here are all the details about the various options you have to solve your
    problem:
    http://SteveOrr.net/articles/ControlPositioning.aspx

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://SteveOrr.net



    "Paul" <> wrote in message
    news:...
    > still trying to figure out how to do this as I have a grid that gets data
    > from a dbase and can change in size. I have controls that I always want
    > to
    > be just below the grid, with no gaps. This is a webform so thinking html
    > may
    > take care of it. When only a few items are returned to the grid I get,
    >
    > datagrid
    > <<< gap, large blank space>>>>
    >
    > other controls.
    >
    > --
    > Paul G
    > Software engineer.
     
    Steve C. Orr [MVP, MCSD], May 31, 2005
    #4
  5. sounds pretty easy will give it a try, thanks.
    --
    Paul G
    Software engineer.


    "Tim McOwan" wrote:

    > Usually VS.NET will put a datagrid inside a <P> tag if you look at the code
    > view. If you get rid of both the opening and closing <P> and </P> then you
    > will lose the gap.
    >
    > "Paul" <> wrote in message
    > news:...
    > > still trying to figure out how to do this as I have a grid that gets data
    > > from a dbase and can change in size. I have controls that I always want
    > > to
    > > be just below the grid, with no gaps. This is a webform so thinking html
    > > may
    > > take care of it. When only a few items are returned to the grid I get,
    > >
    > > datagrid
    > > <<< gap, large blank space>>>>
    > >
    > > other controls.
    > >
    > > --
    > > Paul G
    > > Software engineer.

    >
    >
    >
     
    =?Utf-8?B?UGF1bA==?=, Jun 1, 2005
    #5
  6. ok thanks for the information.
    --
    Paul G
    Software engineer.


    "Steve C. Orr [MVP, MCSD]" wrote:

    > In short, you should set the pageLayout property to FlowLayout instead of
    > GridLayout.
    >
    > Here are all the details about the various options you have to solve your
    > problem:
    > http://SteveOrr.net/articles/ControlPositioning.aspx
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://SteveOrr.net
    >
    >
    >
    > "Paul" <> wrote in message
    > news:...
    > > still trying to figure out how to do this as I have a grid that gets data
    > > from a dbase and can change in size. I have controls that I always want
    > > to
    > > be just below the grid, with no gaps. This is a webform so thinking html
    > > may
    > > take care of it. When only a few items are returned to the grid I get,
    > >
    > > datagrid
    > > <<< gap, large blank space>>>>
    > >
    > > other controls.
    > >
    > > --
    > > Paul G
    > > Software engineer.

    >
    >
    >
     
    =?Utf-8?B?UGF1bA==?=, Jun 1, 2005
    #6
  7. Thanks for the information. I ended up using a table (with absolute
    positioning) with placeholders which seemed to work except that I could not
    access selections from a dropdown listbox that I have embedded in the table.
    html
    <asp:Table id="Table1" style="Z-INDEX: 101; LEFT: 48px; POSITION: absolute;
    TOP: 64px" runat="server"Width="199px" Height="89px">
    <asp:TableRow><asp:TableCell>
    <asp:Label id="Label1" runat="server" Width="155px" > Title of
    page</asp:Label></asp:TableCell>
    </asp:TableRow><asp:TableRow>
    <asp:TableCell>
    <asp:placeHolder id="PlaceHolder1" runat="server"></asp:placeHolder>
    </asp:TableCell></asp:TableRow>
    <asp:TableRow><asp:TableCell>
    <asp:placeHolder id="PlaceHolder2" runat="server"></asp:placeHolder>
    </asp:TableCell></asp:TableRow><asp:TableRow><asp:TableCell>
    <asp:placeHolder id="PlaceHolder3" runat="server"></asp:placeHolder>
    </asp:TableCell></asp:TableRow></asp:Table>
    then in the code I had
    PlaceHolder3.Controls.Add(me.dropdownintable)
    'also had
    dim dropdown as DropDownList.
    dropdown = CType(table1.FindControl("dropdownintable"),DropDownList)
    but got an invalid cast runtime error.
    I was not able to see selections made in the dropdown list from the code as
    I have a routine that gets all of the selections from the dropdownlist and
    then calls a stored procedure for each one found.
    I could browse the dropdownlist in debug mode but it shows no selections
    even when selections are made.
    Paul.
    --
    Paul G
    Software engineer.


    "Steve C. Orr [MVP, MCSD]" wrote:

    > In short, you should set the pageLayout property to FlowLayout instead of
    > GridLayout.
    >
    > Here are all the details about the various options you have to solve your
    > problem:
    > http://SteveOrr.net/articles/ControlPositioning.aspx
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD, MVP
    > http://SteveOrr.net
    >
    >
    >
    > "Paul" <> wrote in message
    > news:...
    > > still trying to figure out how to do this as I have a grid that gets data
    > > from a dbase and can change in size. I have controls that I always want
    > > to
    > > be just below the grid, with no gaps. This is a webform so thinking html
    > > may
    > > take care of it. When only a few items are returned to the grid I get,
    > >
    > > datagrid
    > > <<< gap, large blank space>>>>
    > >
    > > other controls.
    > >
    > > --
    > > Paul G
    > > Software engineer.

    >
    >
    >
     
    =?Utf-8?B?UGF1bA==?=, Jun 1, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Harry
    Replies:
    1
    Views:
    1,683
    Natty Gur
    Jun 25, 2003
  2. John
    Replies:
    0
    Views:
    348
  3. Guest
    Replies:
    1
    Views:
    370
    Tommy
    Nov 27, 2003
  4. Amilcar
    Replies:
    1
    Views:
    1,244
    Munsifali Rashid
    Dec 22, 2003
  5. Alessandro Zifiglio
    Replies:
    0
    Views:
    432
    Alessandro Zifiglio
    Feb 10, 2004
Loading...

Share This Page