Advice on Dynamic Controls

Discussion in 'ASP .Net' started by Eric, Feb 11, 2004.

  1. Eric

    Eric Guest

    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.
    Eric, Feb 11, 2004
    #1
    1. Advertising

  2. Eric

    Eric Guest

    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]" <> wrote in message
    news:...
    > 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
    >
    Eric, Feb 12, 2004
    #2
    1. Advertising

  3. 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
    Steven Cheng[MSFT], Feb 17, 2004
    #3
    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. Ronald
    Replies:
    2
    Views:
    813
    Robbe Morris [C# MVP]
    Jan 17, 2006
  2. Asun Friere
    Replies:
    1
    Views:
    485
    Paul Boddie
    Aug 27, 2003
  3. Peter Hansen
    Replies:
    23
    Views:
    847
    Anton Vredegoor
    Sep 5, 2003
  4. Denny Smolinski via .NET 247

    Dynamic Controls, Placeholder, Retrieve Information from Dynamic Controls

    Denny Smolinski via .NET 247, May 4, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    451
    Eidolon
    May 4, 2004
  5. Durtal

    dynamic controls: architect advice needed

    Durtal, Jun 29, 2009, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    695
    Durtal
    Jun 29, 2009
Loading...

Share This Page