Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > positioning controls

Reply
Thread Tools

positioning controls

 
 
=?Utf-8?B?UGF1bA==?=
Guest
Posts: n/a
 
      05-31-2005
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.
 
Reply With Quote
 
 
 
 
Tim McOwan
Guest
Posts: n/a
 
      05-31-2005
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:6C8A19B3-8ECB-40C1-ADFB-...
> 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.



 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      05-31-2005
Paul,

Use Flow Layout.

Eliyahu

"Paul" <> wrote in message
news:6C8A19B3-8ECB-40C1-ADFB-...
> 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.



 
Reply With Quote
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      05-31-2005
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:6C8A19B3-8ECB-40C1-ADFB-...
> 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.



 
Reply With Quote
 
=?Utf-8?B?UGF1bA==?=
Guest
Posts: n/a
 
      05-31-2005
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:6C8A19B3-8ECB-40C1-ADFB-...
> > 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.

>
>
>

 
Reply With Quote
 
=?Utf-8?B?UGF1bA==?=
Guest
Posts: n/a
 
      05-31-2005
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:6C8A19B3-8ECB-40C1-ADFB-...
> > 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.

>
>
>

 
Reply With Quote
 
=?Utf-8?B?UGF1bA==?=
Guest
Posts: n/a
 
      05-31-2005
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>
<asplaceHolder id="PlaceHolder1" runat="server"></asplaceHolder>
</asp:TableCell></asp:TableRow>
<asp:TableRow><asp:TableCell>
<asplaceHolder id="PlaceHolder2" runat="server"></asplaceHolder>
</asp:TableCell></asp:TableRow><asp:TableRow><asp:TableCell>
<asplaceHolder id="PlaceHolder3" runat="server"></asplaceHolder>
</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"),DropDo wnList)
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:6C8A19B3-8ECB-40C1-ADFB-...
> > 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.

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Positioning dynamic user controls on web forms at run-time Alessandro Zifiglio ASP .Net 0 02-10-2004 07:03 AM
Positioning controls on a webform at runtime Amilcar ASP .Net 1 12-22-2003 06:35 PM
Dynamic server controls and positioning ASP .Net 1 11-27-2003 03:40 PM
Positioning user controls in a page John ASP .Net 0 06-30-2003 04:19 PM
Positioning Dynamically added controls Harry ASP .Net 1 06-25-2003 06:08 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57