473,385 Members | 1,919 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Dynamic datalist height

I have a datalist and I want the datalist to grow from no recors to fill the
screen, but not go beyond the screen height. How do I do that?
I've implemented the scroll bars but that's for the fixed height. I want
the datalist to grow and shrink and never go beyond the current screen
height, if it goes beyond the screen height I want to implement the scroll
bar.
Thank You

Peter
Here's my code, I've tried adding a table, but still can not get it to work.

<asp:Panel ID="Panel1" runat="server" height="300px" ScrollBars="Vertical" >
<table width="100%" style="border: 1px solid; border-color: Blue"
border="0" cellpadding="0" cellspacing="0" >
<tr>
<td>

<asp:datalist id="dlTemplateList" style="width: 100%;"
datakeyfield="ItemID" runat="server"
cellpadding="1" OnItemDataBound="dlTemplateList_ItemDataBound">
<itemtemplate>
<table class="dataliststyle">
<tr>
<td valign="top" align="left" style="width:30px">
<asp:ImageButton ID="ImageButton1" runat="server"
ImageUrl="~/images/icon_sitelog_16px.gif"
onclick="ImageButton1_Click"/>

</td>
<td style="width:320px" class="reportname">
<asp:HyperLink ID="HyperLinkReport" Runat="Server"
Text='<%# DataBinder.Eval(Container.DataItem, "ObjectName") %>'
NavigateUrl='~/DesktopModules/Report/Viewer.aspx?ReportID=<%#
DataBinder.Eval(Container.DataItem, "ItemID") %>'
Target="_top"
/>

<asp:Label ID="lblContent1" runat="server" CssClass="Normal"/>
</td>
<td>
<span id="spanInModuleB" style="overflow:auto; ">
<asp:Label ID="Label1" runat="server" CssClass="description"
Text='<%# DataBinder.Eval(Container.DataItem, "Description") %>'/>

</span>
</td>
</tr>
</table>

</itemtemplate>

</asp:datalist>
Jun 27 '08 #1
0 1055

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Joe | last post by:
Hey, Can anyone out there see why when this code renders there's a 1px space between the headertemplate and the itemtemplate. <asp:datalist id="asplistDL" BorderStyle="None"...
4
by: Miguel Dias Moura | last post by:
Hello, I created a datalist in an ASP.Net / VB page. I display the image and price of a few products. When a user clicks an image I want to load the page "detail.aspx?number=id" and send the...
6
by: tshad | last post by:
I need to get to a status label I have on my footer section of my datalist. There is no event happening that would go to the footer. I am just doing some processing and want to update the label...
3
by: Mirek Endys | last post by:
I have DataList as part of DataList item. DataList in DataList. The parent DataList working well including Edit command, that shows Edit template and correctly bind the data into edit template...
1
by: SunshineInTheRain | last post by:
The following code is dynamic create dropdownmenu which data within pulled from database However, the code work well on IE but not on Firefox. On Firefox, the whole mouseover and mouseout function...
3
by: Peter | last post by:
I have a datalist and I want the datalist to grow from no records to fill the screen, but not go beyond the screen height. How do I do that? I've implemented the scroll bars but it works only for...
0
by: =?Utf-8?B?Vmlua2k=?= | last post by:
Hello Everyone, I am having this problem. I have this datalist and whenever I expand the datalist by the plus button, it overlaps other controls on my web page and sometimes these controls come...
1
by: Brock | last post by:
First note that I am using Framework 1.1. I have an .aspx page that is displaying a list of employees, but only the Employee Number, First Name, Last Name, and Title. It is working great. I...
1
by: Brock | last post by:
Thanks in advance... (you can see a screenshot of what my form looks like currently at http://www.juggernautical.com/DataGrid.jpg - the Datalist is super-imposed in 'design view' but the DataGrid...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.