PC Review


Reply
Thread Tools Rate Thread

DataList & dynamic columns

 
 
John Devlon
Guest
Posts: n/a
 
      25th 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
Entering DataList EditItemTemplate from Outside of the DataList Luis Esteban Valencia Microsoft ASP .NET 1 6th Jan 2005 08:32 PM
Setting up a datalist control - Item_DataBound for a datalist in a datalist Nevyn Twyll Microsoft ASP .NET 8 9th Sep 2004 11:13 PM
Click event in a datalist to post back datalist properties Steve Lloyd Microsoft ASP .NET 1 26th May 2004 05:07 AM
DataList in DataList acko bogicevic Microsoft ASP .NET 2 11th Nov 2003 09:31 AM
Datalist in Datalist How? Gönen EREN Microsoft ASP .NET 0 22nd Aug 2003 03:41 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:01 PM.