473,327 Members | 1,892 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,327 software developers and data experts.

Datalist Headertemplate Problem

I am using a DataList and I have used a PlaceHolder to generate the Headers and Items. The problem is when the items list is big and I scroll down, the header also moves. I am trying the header to be stationary. I am using the following code:

<asp:UpdatePanel ID="pricingUpdatePanel" runat="server">
<ContentTemplate>
<table width="600">
<asp:DataList ID="pricingDataList" runat="server" OnItemDataBound="pricingDataList_ItemDataBound"
OnItemCommand="pricingDataList_ItemCommand" OnCancelCommand="pricingDataList_CancelCommand"
OnDeleteCommand="pricingDataList_DeleteCommand" OnUpdateCommand="pricingDataList_UpdateCommand">

<HeaderTemplate>
<asp:PlaceHolder ID="headerPlaceHolder" runat="server"></asp:PlaceHolder>
</HeaderTemplate>


<ItemTemplate>
<tr onmouseover="this.style.backgroundColor='#ececec'; " onmouseout="this.style.backgroundColor='white';">
<asp:PlaceHolder ID="itemPlaceHolder" runat="server"></asp:PlaceHolder>
<td>
<asp:LinkButton ID="editButton" CommandName="Select" runat="server">Edit</asp:LinkButton>
<asp:LinkButton ID="deleteButton" CommandName="Delete" runat="server">Delete</asp:LinkButton>
</td>
</tr>
</ItemTemplate>
<SelectedItemTemplate>
<tr>
<asp:PlaceHolder EnableViewState="true" ID="selectedPlaceHolder" runat="server"></asp:PlaceHolder>
<td>
<asp:LinkButton ID="saveButton" runat="server" CommandName="Update">Save</asp:LinkButton>
<asp:LinkButton ID="cancelButton" runat="server" CommandName="Cancel">Cancel</asp:LinkButton>
</td>
</tr>
</SelectedItemTemplate>
</asp:DataList>
</table>
</ContentTemplate>
</asp:UpdatePanel>
Jun 1 '07 #1
0 941

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Antonio D'Ottavio | last post by:
Good Morning, In my web page I've a datalist that is sourced by a database, the problem is that I want that one of the column of the datalist contain a dropdownbox that also is sourced by a table...
4
by: Roger R. Smith | last post by:
Anyway I am having a problem with Web Service and DataList in ASP.NET. so the best way to explain it would be with the MSPetShop 3.0 Application. I submitted an order using the Forms on...
1
by: Doug | last post by:
The html below shows DataList "DiscountList" nested within DataList "EventItemList". DiscountList contains a Label control. I'm trying to find the label, using FindControl, during...
10
by: Bharat | last post by:
Hi Folks, Suppose I have two link button on a page (say lnkBtn1 and lnkBtn2). On the click event of the lnkbtn1 I have to add a dynamically created control. And On the click event of the lnkBtn2 I...
2
by: IGotYourDotNet | last post by:
Can anyone tell me how to find a table within a datalist? I can find the labels and textboxes in the dl and change the formatting based on the data, but I can't find the table in the DL. Can anyone...
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...
8
by: bienwell | last post by:
Hi, I have a problem of displaying data bound by a datalist control. In my table, I have a field Start_date which has Short Date data type. I tried to update this field by Current Date. After...
5
by: Ben Fidge | last post by:
I'm using DataList to present tabular data but am often having problems with some rows column alignment being out of synch with the rest of the rows. My DataList looks similar to this...: ...
0
by: rn5a | last post by:
The OnItemCommand in a DataList is raised whenever a Button is clicked in the DataList. Assume that a DataList displays 3 columns & the <HeaderTemplatecontains 3 LinkButtons - one for each column...
4
by: .Net Sports | last post by:
I need to dynamically assign a datalist attribute upon a helper function receiving data from a querystring. If a user picks a certain region, i need the datalist to display its back color, or any...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.