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

Making HeaderTemplate Stationary if Using DataList

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
3 1840
Does anyone have any solution for this problem??
Jun 1 '07 #2
Any senior group member or moderator can answer this for me. i guess no one has the solution...
Jun 1 '07 #3
kenobewan
4,871 Expert 4TB
You may need to build a custom control. Here is an article that may help:
Authoring Custom Controls
Jun 2 '07 #4

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

Similar topics

4
by: Stephan Bour | last post by:
Hi, I have a datagrid databound to a SQL query. I'd like to allow editing of some columns but not all. Is there a way to turn off the conversion of the datagrid cells to textboxes for some columns...
5
by: Yan Wang | last post by:
Hi! Does anyone know how to get the text in textbox field which is in HeaderTemplate of a DataGrid? In the following code, I can not get text of "tbName". I typed something in that box. I can...
3
by: Nathan Sokalski | last post by:
I have three LinkButtons in the HeaderTemplate of my DataList (I use them to let the user determine what to sort the list by). I am assuming that the event will be bubbled to the ItemCommand event...
1
by: Gary | last post by:
I have a datalist and want to set design on headertemplate based on data values. thx.
2
by: Andy | last post by:
Hi, This is one of those things I thought should e easy... I'm programatically trying to set the navigateURL property in a hyperlink in the headertemplate of a repeater, but always get the...
0
by: Fahim | last post by:
I have a datalist on my webform and i have put some linkbuttons in HeaderTemplate of datalist. Now on click of a LinkButton i access it in ItemCommand Event using FindControl and change its Text...
2
by: jobs at webdos | last post by:
I have data that looks like this prodid fileid date where prodid repeats I want report like this prodid - fileid date
0
by: mayankaswal | last post by:
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...
0
colinod
by: colinod | last post by:
Does anyone know if you can send an email from Access using the stationary set in outlook. I have a form that sends the email but it only opens a blank email, it would be great if it opened using...
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...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.