Datalist- setting repeatcolumns value dynamically. Possible?

B

bubba ho-tep

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.
 
G

Guest

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 :).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Show tif or pdf in DataList 2
datalist problem 0
Datalist Control 2
problem datalist 2
Datalist spacing 2
using anchor with DataList (asp.net 2.0 with VB) 1
datalist question 0
DataList Control and CSS 0

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top