Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > How to change DataList height

Reply
Thread Tools

How to change DataList height

 
 
Angel
Guest
Posts: n/a
 
      11-02-2004
How can I change the number of items that are seen without scrolling in
DataList.
I tried with changing DataList.Height but it does not seems to work.

Thanks
Angel




 
Reply With Quote
 
 
 
 
Robert Koritnik
Guest
Posts: n/a
 
      11-02-2004
Using Javascript on the client side like:
document.getElementById('listboxid').size = N;

Using codebehind on server side like:
listboxid.Rows = N;

In both examples N denotes a positive integer. On the serverside Rows
defaults to 4, but you can change it.

On the serverside Height property denotes a height in any acceptable unit
(normally in pixels) that is set on the client side as CSS style.

--
RobertK
{ Clever? No just smart. }

"Angel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How can I change the number of items that are seen without scrolling in
> DataList.
> I tried with changing DataList.Height but it does not seems to work.
>
> Thanks
> Angel
>
>
>
>



 
Reply With Quote
 
 
 
 
Angel
Guest
Posts: n/a
 
      11-02-2004
I am talking about
System.Web.UI.WebControls.DataList

DataList does not have Rows property


 
Reply With Quote
 
Robert Koritnik
Guest
Posts: n/a
 
      11-03-2004
Sorry. Silly me. By some higher power I was thinking about ListBox
control...

Ok. So We have a DataList. k. A DataList control renders as a <TABLE>
element on the client side. Ok thinking about a DataList I don't exactly get
what you want to acomplish. If I understand the problem you would like to
make shure that a certain ammount of items are displayed in the client
window. The number of items on the page depends on:
- the font size you use
- line hight set by CSS
- window size
- direction of your datalist item display

Could you please explain a little bit more what do you need to do? I still
don't think that I really get what you want.

--
RobertK
{ Clever? No just smart. }

"Angel" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I am talking about
> System.Web.UI.WebControls.DataList
>
> DataList does not have Rows property
>
>



 
Reply With Quote
 
 
 
Reply

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
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Why can't I change height with <col width="50" height="100">? Bernd Meier HTML 6 01-14-2008 07:25 AM
measuring web controls height at runtime (or converting .height % to px) Wotney ASP .Net 1 10-25-2006 01:39 PM
how to get specific cell height without hard-coding a height value laredotornado@zipmail.com HTML 0 08-19-2006 08:13 PM
Setting up a datalist control - Item_DataBound for a datalist in a datalist Nevyn Twyll ASP .Net 8 09-09-2004 10:13 PM



Advertisments