PC Review


Reply
Thread Tools Rate Thread

DataList & dynamic columns

 
 
John Devlon
Guest
Posts: n/a
 
      24th Nov 2009

Hi,

Can anyone please help me?

I've used a DataList, using 3 fixed columns, to display some information.

How can I adjust the datalist controle to use less or more columns if the
window is resized. You see this functionality on many sites but I can't
figure out how its been done. Does anyone know how?

Thanx

john



 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      25th Nov 2009
On Nov 25, 12:43*am, "John Devlon" <johndev...@hotmail.com> wrote:
> Hi,
>
> Can anyone please help me?
>
> I've used a DataList, using 3 fixed columns, to display some information.
>
> How can I adjust the datalist controle to use less or more columns if the
> window is resized. You see this functionality on many sites but I can't
> figure out how its been done. Does anyone know how?
>
> Thanx
>
> john


I think that changing number of columns in the standard asp server
control is not possible without a postback or refresh the browser. It
means, if you implement such behaviour, the page would postback to the
server each time you resize the window, which is an absurd. What you
can do is, try to add a parent div container with overflow:hidden and
put your datalist into it. I think this could help dynamically "clip"
the region which is out of space on the current layout.

http://www.w3.org/TR/CSS2/visufx.html

DataList control renders its grid of data into an HTML <table>. So,
another way could be a javascript which could enumerate all rows in
that table, find third column in each row and set its style to
visibility:hidden when necessary.
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Dynamic datalist height Peter Microsoft ASP .NET 0 17th Apr 2008 10:50 PM
Dynamic Templates for a datalist KT Microsoft VB .NET 0 2nd Dec 2005 11:25 AM
dynamic datalist. saud ahmed via .NET 247 Microsoft ASP .NET 0 3rd Apr 2005 06:51 AM
Re: dynamic datalist style Davide Vernole [MVP] Microsoft ASP .NET 0 9th Sep 2004 11:36 PM
DataList & Dynamic Controls Scott Schluer Microsoft ASP .NET 1 8th Feb 2004 09:27 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:51 AM.