|
 |
aspx_beginners thread: RE: Stupid Question Du Jour - How to position a web form control?
Message #1 by "Ron Howerton" <ron.howerton@s...> on Mon, 3 Mar 2003 19:57:14
|
|
This only seems to push the problem to the placeholder, but let's say I
drop a placeholder on my form. Now, how do I tell the placeholder exactly
where on the form to position my unknown number of grids?
> I think one placeholder is all you need because I think the rest of the
controls will not overlap, they will go across horizontally or down
vertically.
Message #2 by "Bob Riley at cars4U.com" <BRiley@c...> on Mon, 3 Mar 2003 14:47:41 -0500
|
|
The datagrid will appear inside the placeholder (and on the page where
you place your placeholder). You can add formatting HTML tags inside
this as well to position the datagrid/datalist/repeater within the
placeholder
-----Original Message-----
From: Ron Howerton [mailto:ron.howerton@s...]
Sent: Monday, March 03, 2003 2:57 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: Stupid Question Du Jour - How to position
a web form control?
This only seems to push the problem to the placeholder, but let's say I
drop a placeholder on my form. Now, how do I tell the placeholder
exactly
where on the form to position my unknown number of grids?
> I think one placeholder is all you need because I think the rest of
the
controls will not overlap, they will go across horizontally or down
vertically.
Message #3 by "Ron Howerton" <ron.howerton@s...> on Mon, 3 Mar 2003 20:57:44
|
|
If I really must use these placeholders (and I am not satisfied this is
the ONLY way to do this just yet), specifically what HTML tags will
position my grids exactly where I want them within the placeholder? I
expect to pass an X and Y coordinate (in pixels, inches, millimeters, or
furlongs/fortnight, or SOMETHING), just like I have done for the last 10+
years in Visual Basic. Please point me to an actual HTML tag that I can
at least look up on the web someplace to figure out how to use it. Right
now I don't even know what to search for except Placeholder and the
references I'm finding for it don't indicate how, or even why I would use
it in this instance. Please assume complete (and until now blissful)
ignorance of HTML.
BTW, I see no placeholders on my .NET created form when I position
multiple grids in the IDE. I don't understand why the .NET IDE can
position grids directly on a web form without using placeholders and I
cannot. Can somebody explain why this is so difficult to do
programatically so I can at least understand why the IDE can do something
I can't?
> The datagrid will appear inside the placeholder (and on the page where
you place your placeholder). You can add formatting HTML tags inside
this as well to position the datagrid/datalist/repeater within the
placeholder
Message #4 by "Bob Riley at cars4U.com" <BRiley@c...> on Mon, 3 Mar 2003 15:46:53 -0500
|
|
Use an HTML table to position your placeholders (or within the
placeholder to position your datagrids). Understanding how tables work
in HTML will alleviate all your positioning problems.
-----Original Message-----
From: Ron Howerton [mailto:ron.howerton@s...]
Sent: Monday, March 03, 2003 3:58 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: Stupid Question Du Jour - How to position
a web form control?
If I really must use these placeholders (and I am not satisfied this is
the ONLY way to do this just yet), specifically what HTML tags will
position my grids exactly where I want them within the placeholder? I
expect to pass an X and Y coordinate (in pixels, inches, millimeters, or
furlongs/fortnight, or SOMETHING), just like I have done for the last
10+
years in Visual Basic. Please point me to an actual HTML tag that I can
at least look up on the web someplace to figure out how to use it.
Right
now I don't even know what to search for except Placeholder and the
references I'm finding for it don't indicate how, or even why I would
use
it in this instance. Please assume complete (and until now blissful)
ignorance of HTML.
BTW, I see no placeholders on my .NET created form when I position
multiple grids in the IDE. I don't understand why the .NET IDE can
position grids directly on a web form without using placeholders and I
cannot. Can somebody explain why this is so difficult to do
programatically so I can at least understand why the IDE can do
something
I can't?
> The datagrid will appear inside the placeholder (and on the page where
=3D
you place your placeholder). You can add formatting HTML tags inside
=3D
this as well to position the datagrid/datalist/repeater within the =3D
placeholder
Message #5 by "Ron Howerton" <ron.howerton@s...> on Mon, 3 Mar 2003 22:09:06
|
|
ACK! This takes me back to where I started, except now I've got grids
inside of placeholders inside of an HTML table, which is all that the data
grids will resolve into anyway. is there no simple way to position a grid
on a form without having containers inside of containers inside of
containers?
> Use an HTML table to position your placeholders (or within the
placeholder to position your datagrids). Understanding how tables work
in HTML will alleviate all your positioning problems.
-----Original Message-----
From: Ron Howerton [mailto:ron.howerton@s...]
Sent: Monday, March 03, 2003 3:58 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: Stupid Question Du Jour - How to position
a web form control?
If I really must use these placeholders (and I am not satisfied this is
the ONLY way to do this just yet), specifically what HTML tags will
position my grids exactly where I want them within the placeholder? I
expect to pass an X and Y coordinate (in pixels, inches, millimeters, or
furlongs/fortnight, or SOMETHING), just like I have done for the last
10+
years in Visual Basic. Please point me to an actual HTML tag that I can
at least look up on the web someplace to figure out how to use it.
Right
now I don't even know what to search for except Placeholder and the
references I'm finding for it don't indicate how, or even why I would
use
it in this instance. Please assume complete (and until now blissful)
ignorance of HTML.
BTW, I see no placeholders on my .NET created form when I position
multiple grids in the IDE. I don't understand why the .NET IDE can
position grids directly on a web form without using placeholders and I
cannot. Can somebody explain why this is so difficult to do
programatically so I can at least understand why the IDE can do
something
I can't?
> The datagrid will appear inside the placeholder (and on the page where
=3D
you place your placeholder). You can add formatting HTML tags inside
=3D
this as well to position the datagrid/datalist/repeater within the =3D
placeholder
Message #6 by "Bob Riley at cars4U.com" <BRiley@c...> on Mon, 3 Mar 2003 16:58:00 -0500
|
|
Unfortunately, that is the most simple way I know.
-----Original Message-----
From: Ron Howerton [mailto:ron.howerton@s...]
Sent: Monday, March 03, 2003 5:09 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: Stupid Question Du Jour - How to position
a web form control?
ACK! This takes me back to where I started, except now I've got grids
inside of placeholders inside of an HTML table, which is all that the
data
grids will resolve into anyway. is there no simple way to position a
grid
on a form without having containers inside of containers inside of
containers?
> Use an HTML table to position your placeholders (or within the =3D
placeholder to position your datagrids). Understanding how tables work
=3D
in HTML will alleviate all your positioning problems. =3D20
-----Original Message-----
From: Ron Howerton [mailto:ron.howerton@s...]
Sent: Monday, March 03, 2003 3:58 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: Stupid Question Du Jour - How to position
a web form control?
If I really must use these placeholders (and I am not satisfied this
is=3D20
the ONLY way to do this just yet), specifically what HTML tags will=3D20
position my grids exactly where I want them within the placeholder?
I=3D20
expect to pass an X and Y coordinate (in pixels, inches, millimeters, or
=3D
furlongs/fortnight, or SOMETHING), just like I have done for the last
=3D
10+=3D20
years in Visual Basic. Please point me to an actual HTML tag that I can
=3D
at least look up on the web someplace to figure out how to use it. =3D
Right=3D20
now I don't even know what to search for except Placeholder and the=3D20
references I'm finding for it don't indicate how, or even why I would
=3D
use=3D20
it in this instance. Please assume complete (and until now
blissful)=3D20
ignorance of HTML.
BTW, I see no placeholders on my .NET created form when I position=3D20
multiple grids in the IDE. I don't understand why the .NET IDE can=3D20
position grids directly on a web form without using placeholders and
I=3D20
cannot. Can somebody explain why this is so difficult to do=3D20
programatically so I can at least understand why the IDE can do =3D
something=3D20
I can't?
> The datagrid will appear inside the placeholder (and on the page where
=3D
=3D3D
you place your placeholder). You can add formatting HTML tags inside
=3D
=3D3D
this as well to position the datagrid/datalist/repeater within the =3D3D
placeholder
---
Change your mail options at http://p2p.wrox.com/manager.asp or=3D20
to unsubscribe send a blank email to =3D
Message #7 by "Alex Smotritsky" <alex.smotritsky@v...> on Mon, 3 Mar 2003 17:28:21 -0500
|
|
I think: if you generate a grid at a placeholder and put a <br> after
it, you can generate a column of grids this way. With a little mod
arithmetic -- u can do a table of grids. When I generate statements with
<br>'s after them at a placehloder, I get rows of text one after the
other. With mod arithmetic and <br> or no <br> you can generate multiple
columns of grids -- I think.
-----Original Message-----
From: Ron Howerton [mailto:ron.howerton@s...]
Sent: Monday, March 03, 2003 10:09 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: Stupid Question Du Jour - How to position
a web form control?
ACK! This takes me back to where I started, except now I've got grids
inside of placeholders inside of an HTML table, which is all that the
data
grids will resolve into anyway. is there no simple way to position a
grid
on a form without having containers inside of containers inside of
containers?
> Use an HTML table to position your placeholders (or within the
placeholder to position your datagrids). Understanding how tables work
= in HTML will alleviate all your positioning problems.
-----Original Message-----
From: Ron Howerton [mailto:ron.howerton@s...]
Sent: Monday, March 03, 2003 3:58 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: Stupid Question Du Jour - How to position
a web form control?
If I really must use these placeholders (and I am not satisfied this
is=20 the ONLY way to do this just yet), specifically what HTML tags
will=20 position my grids exactly where I want them within the
placeholder? I=20 expect to pass an X and Y coordinate (in pixels,
inches, millimeters, or
furlongs/fortnight, or SOMETHING), just like I have done for the last
10+
years in Visual Basic. Please point me to an actual HTML tag that I can
at least look up on the web someplace to figure out how to use it.
Right=20 now I don't even know what to search for except Placeholder and
the=20 references I'm finding for it don't indicate how, or even why I
would = use=20 it in this instance. Please assume complete (and until
now blissful)=20 ignorance of HTML.
BTW, I see no placeholders on my .NET created form when I position
multiple grids in the IDE. I don't understand why the .NET IDE can
position grids directly on a web form without using placeholders and
I=20 cannot. Can somebody explain why this is so difficult to do
programatically so I can at least understand why the IDE can do
something=20 I can't?
> The datagrid will appear inside the placeholder (and on the page where
>
=3D
you place your placeholder). You can add formatting HTML tags inside
=3D this as well to position the datagrid/datalist/repeater within the
=3D placeholder
---
Change your mail options at http://p2p.wrox.com/manager.asp or=20 to
unsubscribe send a blank email to =
Message #8 by "Ron Howerton" <ron.howerton@s...> on Tue, 4 Mar 2003 16:40:27
|
|
It sounds to me like everybody is saying that I cannot directly position
my grids passing X and Y coordinates. Then what, I wonder, is the point
of GridLayout?
And I still haven't heard an answer of how the .NET IDE can ensure my
grids are positioned where I put them in the designer when I cannot do so
with code. This doesn't make sense.
Message #9 by "Alex Smotritsky" <alex.smotritsky@v...> on Tue, 4 Mar 2003 12:08:05 -0500
|
|
If you're generating your grids dynamically so their sizes vary,
figuring out coordinates for each grid is gonna be more trouble then
it's worth. Tables, datarepeaters, html tags alleviate these problems.
You seem to be stuck on this coordinate thing which is probably the most
complicated way to do what you want.
-----Original Message-----
From: Ron Howerton [mailto:ron.howerton@s...]
Sent: Tuesday, March 04, 2003 4:40 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: Stupid Question Du Jour - How to position
a web form control?
It sounds to me like everybody is saying that I cannot directly position
my grids passing X and Y coordinates. Then what, I wonder, is the point
of GridLayout?
And I still haven't heard an answer of how the .NET IDE can ensure my
grids are positioned where I put them in the designer when I cannot do
so
with code. This doesn't make sense.
Message #10 by "Ron Howerton" <ron.howerton@s...> on Tue, 4 Mar 2003 18:51:12
|
|
I was trying to avoid getting into the specifics of what I'm trying to
accomplish because I didn't want it to appear as though I was asking
anybody to write my code for me. However, if it will help to get to the
information that I'm looking for instead of work-around solutions, here
are the gory details:
The sizes of the grids will not vary - just the number of grids (although
I don't see why either should be a complex issue). IOW, on one run, I may
have two grids, on run 2 I may have 20 - it depends on the results of a
SQL query. The user wants these all to appear on a single web page - no
repeaters, no paging, and it has to be printable EXACTLY the way it
looks. The grids must be laid out two to a page, side by side, three
columns each, accounting for multiple pages, headers, page numbers, etc
(much of which IE would take care of for me if I could just get a page to
look right to begin with). For scalability reaons, obviously, I do not
wish to be limited by a pre-determined number of grids, tables, place-
holders, or any other element that has to be dropped in the IDE - this is
why I need to create these grids on the fly. It should be apparent that
the problem is one of appearance - I have very specific instructions on
how this page is supposed to look.
Based on my previous experience doing exactly this sort of thing, the only
way I know I can get there is by explicitly positioning the grids
(setting .Top and .Left properties in VB - not a big deal at all). I
realize that you used to not be able to state things so explicitly in
HTML, but the times they are a changin'. IMHO, if I'm learning something
new, making use of the latest technology is better than relying on work-
arounds based on older technology. IE supports grid layout now. So does
the .NET IDE. It makes sense to me to make use of this new technology
rather than placing grids inside of placeholders inside of tables - a more
complex solution where output appearance cannot be guaranteed.
I am not convinced this can't be done, just that nobody who has responded
yet knows how. If you are aware of a way to do this without using
placeholders and tables, ad nauseum, please tell me. I don't care how
complex you think it might be - it can't be any more difficult than the
advice I've already been offered. Thanks.
> If you're generating your grids dynamically so their sizes vary,
figuring out coordinates for each grid is gonna be more trouble then
it's worth. Tables, datarepeaters, html tags alleviate these problems.
You seem to be stuck on this coordinate thing which is probably the most
complicated way to do what you want.
-----Original Message-----
From: Ron Howerton [mailto:ron.howerton@s...]
Sent: Tuesday, March 04, 2003 4:40 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: Stupid Question Du Jour - How to position
a web form control?
It sounds to me like everybody is saying that I cannot directly position
my grids passing X and Y coordinates. Then what, I wonder, is the point
of GridLayout?
And I still haven't heard an answer of how the .NET IDE can ensure my
grids are positioned where I put them in the designer when I cannot do
so
with code. This doesn't make sense.
Message #11 by "Van Knowles" <vknowles@s...> on Tue, 4 Mar 2003 19:14:59
|
|
I think what you need to know is how to access the TOP and LEFT
atttributes.
They are components of the Style attribute.
So, to establish the location and size of a grid in VB.NET:
myGrid.Height = New Unit(H)
myGrid.Width = New Unit(W)
myGrid.Style.Style.Item("LEFT") = L & "px"
myGrid.Style.Style.Item("TOP") = T & "px"
(The style components are strings.)
I hope that helps.
-Van
Message #12 by "Ron Howerton" <ron.howerton@s...> on Tue, 4 Mar 2003 20:05:41
|
|
Yes, that is what I was looking for! I'd expected since a grid looked
like a standard VB object, TOP and LEFT would be hanging off the property
list root, like HEIGHT and WIDTH. I don't understand why they are buried
this way, but at least they are available.
Thank you, thank you, thank you!!!
I think this can now be declared a dead thread.
> I think what you need to know is how to access the TOP and LEFT
attributes. They are components of the Style attribute.
So, to establish the location and size of a grid in VB.NET:
myGrid.Height = New Unit(H)
myGrid.Width = New Unit(W)
myGrid.Style.Style.Item("LEFT") = L & "px"
myGrid.Style.Style.Item("TOP") = T & "px"
(The style components are strings.)
I hope that helps.
> -Van
Message #13 by "Alex Smotritsky" <alex.smotritsky@v...> on Tue, 4 Mar 2003 15:35:19 -0500
|
|
You need a datalist control to hold your grids. In professional asp.net
(wrox) page 314 there is a section called "Multiple column layouts with
a datalist control" (which is essentially a table). I think that's the
way to handle your project.
-----Original Message-----
From: Ron Howerton [mailto:ron.howerton@s...]
Sent: Tuesday, March 04, 2003 6:51 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: Stupid Question Du Jour - How to position
a web form control?
I was trying to avoid getting into the specifics of what I'm trying to
accomplish because I didn't want it to appear as though I was asking
anybody to write my code for me. However, if it will help to get to the
information that I'm looking for instead of work-around solutions, here
are the gory details:
The sizes of the grids will not vary - just the number of grids
(although
I don't see why either should be a complex issue). IOW, on one run, I
may
have two grids, on run 2 I may have 20 - it depends on the results of a
SQL query. The user wants these all to appear on a single web page - no
repeaters, no paging, and it has to be printable EXACTLY the way it
looks. The grids must be laid out two to a page, side by side, three
columns each, accounting for multiple pages, headers, page numbers, etc
(much of which IE would take care of for me if I could just get a page
to
look right to begin with). For scalability reaons, obviously, I do not
wish to be limited by a pre-determined number of grids, tables, place-
holders, or any other element that has to be dropped in the IDE - this
is
why I need to create these grids on the fly. It should be apparent that
the problem is one of appearance - I have very specific instructions on
how this page is supposed to look.
Based on my previous experience doing exactly this sort of thing, the
only
way I know I can get there is by explicitly positioning the grids
(setting .Top and .Left properties in VB - not a big deal at all). I
realize that you used to not be able to state things so explicitly in
HTML, but the times they are a changin'. IMHO, if I'm learning
something
new, making use of the latest technology is better than relying on work-
arounds based on older technology. IE supports grid layout now. So
does
the .NET IDE. It makes sense to me to make use of this new technology
rather than placing grids inside of placeholders inside of tables - a
more
complex solution where output appearance cannot be guaranteed.
I am not convinced this can't be done, just that nobody who has
responded
yet knows how. If you are aware of a way to do this without using
placeholders and tables, ad nauseum, please tell me. I don't care how
complex you think it might be - it can't be any more difficult than the
advice I've already been offered. Thanks.
> If you're generating your grids dynamically so their sizes vary,
figuring out coordinates for each grid is gonna be more trouble then
it's worth. Tables, datarepeaters, html tags alleviate these problems.
You seem to be stuck on this coordinate thing which is probably the most
complicated way to do what you want.
-----Original Message-----
From: Ron Howerton [mailto:ron.howerton@s...]
Sent: Tuesday, March 04, 2003 4:40 PM
To: aspx_beginners
Subject: [aspx_beginners] RE: Stupid Question Du Jour - How to position
a web form control?
It sounds to me like everybody is saying that I cannot directly position
my grids passing X and Y coordinates. Then what, I wonder, is the point
of GridLayout?
And I still haven't heard an answer of how the .NET IDE can ensure my
grids are positioned where I put them in the designer when I cannot do
so
with code. This doesn't make sense.
Message #14 by "Ron Howerton" <ron.howerton@s...> on Wed, 5 Mar 2003 16:25:59
|
|
Alex,
Thanks for your assistance with this problem. I think I have a handle now
on how to do it.
> You need a datalist control to hold your grids. In professional asp.net
(wrox) page 314 there is a section called "Multiple column layouts with
a datalist control" (which is essentially a table). I think that's the
way to handle your project.
|
|
 |