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 the fixed height. I
want
the datalist to grow and shrink and never go beyond the current screen
height, if the data can not fit in one screen I want to implement scroll
bars, but only scroll the datalist not any other parts.
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="Ver tical" >
<table width="100%" style="border: 1px solid; border-color: Blue"
border="0" cellpadding="0" cellspacing="0" >
<tr>
<td>
<asp:datalist id="dlTemplateL ist" style="width: 100%;"
datakeyfield="I temID" runat="server"
cellpadding="1" OnItemDataBound ="dlTemplateLis t_ItemDataBound ">
<itemtemplate >
<table class="datalist style">
<tr>
<td valign="top" align="left" style="width:30 px">
<asp:ImageButto n ID="ImageButton 1" runat="server"
ImageUrl="~/images/icon_sitelog_16 px.gif"
onclick="ImageB utton1_Click"/>
</td>
<td style="width:32 0px" class="reportna me">
<asp:HyperLin k ID="HyperLinkRe port" Runat="Server"
Text='<%# DataBinder.Eval (Container.Data Item, "ObjectName ") %>'
NavigateUrl='~/DesktopModules/Report/Viewer.aspx?Rep ortID=<%#
DataBinder.Eval (Container.Data Item, "ItemID") %>'
Target="_top"
/>
<asp:Label ID="lblContent1 " runat="server" CssClass="Norma l"/>
</td>
<td>
<span id="spanInModul eB" style="overflow :auto; ">
<asp:Label ID="Label1" runat="server" CssClass="descr iption"
Text='<%# DataBinder.Eval (Container.Data Item, "Descriptio n") %>'/>
</span>
</td>
</tr>
</table>
</itemtemplate>
</asp:datalist>
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 the fixed height. I
want
the datalist to grow and shrink and never go beyond the current screen
height, if the data can not fit in one screen I want to implement scroll
bars, but only scroll the datalist not any other parts.
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="Ver tical" >
<table width="100%" style="border: 1px solid; border-color: Blue"
border="0" cellpadding="0" cellspacing="0" >
<tr>
<td>
<asp:datalist id="dlTemplateL ist" style="width: 100%;"
datakeyfield="I temID" runat="server"
cellpadding="1" OnItemDataBound ="dlTemplateLis t_ItemDataBound ">
<itemtemplate >
<table class="datalist style">
<tr>
<td valign="top" align="left" style="width:30 px">
<asp:ImageButto n ID="ImageButton 1" runat="server"
ImageUrl="~/images/icon_sitelog_16 px.gif"
onclick="ImageB utton1_Click"/>
</td>
<td style="width:32 0px" class="reportna me">
<asp:HyperLin k ID="HyperLinkRe port" Runat="Server"
Text='<%# DataBinder.Eval (Container.Data Item, "ObjectName ") %>'
NavigateUrl='~/DesktopModules/Report/Viewer.aspx?Rep ortID=<%#
DataBinder.Eval (Container.Data Item, "ItemID") %>'
Target="_top"
/>
<asp:Label ID="lblContent1 " runat="server" CssClass="Norma l"/>
</td>
<td>
<span id="spanInModul eB" style="overflow :auto; ">
<asp:Label ID="Label1" runat="server" CssClass="descr iption"
Text='<%# DataBinder.Eval (Container.Data Item, "Descriptio n") %>'/>
</span>
</td>
</tr>
</table>
</itemtemplate>
</asp:datalist>
Comment