positioning controls

G

Guest

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

Tim McOwan

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.
 
G

Guest

sounds pretty easy will give it a try, thanks.
--
Paul G
Software engineer.


Tim McOwan said:
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.
 
G

Guest

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 said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top