Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Datalist- setting repeatcolumns value dynamically. Possible?

Thread Tools

Datalist- setting repeatcolumns value dynamically. Possible?

bubba ho-tep
Posts: n/a

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.

Reply With Quote
Posts: n/a
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 .

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
issue with DataList RepeatColumns property ASP .Net 0 10-17-2008 03:51 PM
DataList, repeatcolumns > 1 in flow layout David Lozzi ASP .Net 1 02-01-2007 11:58 AM
Databound control with both RepeatColumns and also Paging enabled? Al Cadalzo ASP .Net Web Controls 0 01-10-2006 07:43 PM
DataList: Add rows when RepeatColumns is set Mike ASP .Net Web Controls 0 05-27-2004 11:53 AM
repeatcolumns ... what about left to right first,then down ??? ASP .Net Web Controls 1 02-01-2004 07:53 PM