Datalist- setting repeatcolumns value dynamically. Possible?

Discussion in 'ASP .Net' started by bubba ho-tep, May 22, 2006.

  1. bubba ho-tep

    bubba ho-tep Guest

    Hello,

    When you have a datalist repeating horizontally, is it possible to set
    the repeatcolumns dynamically based on the user's window size? EG. If
    the user's window is wide enough for 3 datalist items without the
    horizontal scrollbar appearing, then repeatcolumns=3. However, if the
    user's window is wide enough for 5 items without the horizontal
    scrollbar, then repeatcolumns=5.

    Thanks in advance for any wisdom dispensed.
     
    bubba ho-tep, May 22, 2006
    #1
    1. Advertising

  2. It might be able to figure out in a cross platform portable way what the
    current client rectangle for a browser is, but I don't know how to do it.

    A follow-up question you might want to ask though is what happens if the
    user resizes his browser after he gets the list?

    If you want items to naturally stack horizontally, you could use floats and
    divs, I think the control adapter examples might give you a solution if you
    set the repeat columns to 1. Just make each item a fixed hieight and the
    container they are displayed in resize with the browser and magic happens :).
     
    =?Utf-8?B?TGFycnkgQ2hhcmx0b24=?=, May 22, 2006
    #2
    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. Nevyn Twyll
    Replies:
    8
    Views:
    1,882
  2. David Lozzi

    DataList, repeatcolumns > 1 in flow layout

    David Lozzi, Feb 1, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    2,625
    Tim Mackey
    Feb 1, 2007
  3. Replies:
    0
    Views:
    467
  4. Replies:
    1
    Views:
    105
  5. Mike

    DataList: Add rows when RepeatColumns is set

    Mike, May 27, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    294
Loading...

Share This Page