I am in need of some advice on how to do the following:
Have some type of container on form that would fill the visible area on
screen (assuming the browser was maximized). I would like to specify a
number of vertical columns that would be equally spaced. I would then like
to be able to dynamically add a variable number of various types of web
controls in a top to bottom fashion. When the maximum number of controls
placed in a column would not be visible on the screen, additional controls
would 'flow' to the next column and so on. I was able to achieve only
limited success with this using a Table control. The problem was knowing
when I had reached the maximum number of controls that would be visible,
without scrolling, on the screen and starting in the next column.
Thank you for your help. 2 1145
Steven,
Thank you for reply and sample. You've once again analyzed my question
correctly. I work with your suggestions and the attachment today and let
you know.
Thanks
"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:5Y**************@cpmsftngxa07.phx.gbl... Hi Eric,
Thanks for posting in the community! From your description, you're wanting to dynamically add controls onto a ASP.NET web page which will be located in a certain container control vertically and the Container control will divide the page into serveral equals columns. Also, you want those controls be added into the container control from left to right in those columns and when one certain column's sub control's total height is larger than the container's height, the sequential ones will be added into the next column from top, yes? If there is anything I misunderstood, please feel free to let me know.
As for this quesion, I also think the "Table" control you used is the most proper one to perform as the container control since you can set its width and height and dynamically add rows and cells(column). As for your
problem, you can add a table control set as width="100%" height="100"% and only has one row and one cell in that row at beginning. Then, at runtime, when it is being added sub controls, when one cell is full in vertical height, we can dynamically add a new column add then start adding in the new cell.
However, the problem is that when dynamically add controls, how can we
know that the current TableCell is full in vertical height. Here are to cases: 1. If we set the Table's height as relative value such as "100%", then we can't get its absolute height at runtime, we need to specify a certain value( I think generally 500-600 is proper). When all the controls (having been added into current tablecell)'s total height is close to this value, then we add a new tablecell and start adding controls in that new cell.
2.If we specify the Table's Height as absolute value at begining, that'll be much simpler, just get the table's height as the max value, and do the determination whether to add new cell at runtime as mentioned in #1.
I've made a simple page to show the means I mentioned above and the page code has been attached in this message. In addition, I still think the
main problem is we need to get the browser's heigth. If not, we could only specify a fixed value as the max height of a page(the container control). Do you think so? Regards,
Steven Cheng Microsoft Online Support
Get Secure! www.microsoft.com/security (This posting is provided "AS IS", with no warranties, and confers no rights.)
Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx
Hi Eric,
I haven't heard from you. Have you had a chance to fully test on my former
suggestions or have you got any progress on this issue? If you have any
questions or need any further help, please feel free to let me know.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey http://msdn.microsoft.com/asp.net/whidbey/default.aspx This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: theComputer7 |
last post by:
I cut down the code to make this half way understandable... I have
read Data Grid girls caution about over use of dynamic controls. I
truly believe what I am doing requires dynamically inserted...
|
by: VB Programmer |
last post by:
I have an HTML newsletter that I want to email to a bunch of people found in
a database.
1. I want some parts of the newsletter to filled in dynamically from a
database (company, address,...
|
by: Leo J. Hart IV |
last post by:
OK, here's another question for the experts:
I am building a multi-step (3 steps actually) form using a panel for
each step and hiding/displaying the appropriate panel/panels depending
on which...
|
by: pbb |
last post by:
I have a web page on which I dynamically create controls based on the
selection a user makes from a dropdownlist (this ddl is not dynamic).
Depending on the user's selection, the controls could be...
|
by: Diffident |
last post by:
Hello All,
I am trying to add dynamic controls onto my page and here is how I am doing
that.
I have a page which has a button called as "AddMoreControls" and in this
button's event handler I...
| |
by: Tarscher |
last post by:
hi all,
I have this seemingly simple problem. I have lost a lot of time on it
though.
When a user selects a value from a dropdownlist (static control) a
dynamic control is generated. I have...
|
by: MaryamSh |
last post by:
Hi,
I am creating a Dynamic Search in my application.
I create a user control and in Page_load event I create a dynamic dropdownlist and 2 dynamic button (Add,Remove)
By pressing Add button...
|
by: MaryamSh |
last post by:
Create Dynamic Dropdownlist Controls and related event
--------------------------------------------------------------------------------
Hi,
I am creating a Dynamic Search in my application.
I...
|
by: englishman69 |
last post by:
Hello,
I have been banging my head against this one for a while... Searches online have revealed many different proposals for correcting my issue but none that I can follow! My basic situation...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |