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

Nested Datalist c#

How do i attach onitemdatabound or any event handler to a datalist nested in
a repeater?

/*code ************************************************** */
<asp:repeater EnableViewState="False" id="rptEmployees" runat="server">
<itemtemplate>
<table border="0" cellpadding="2" width="100%" cellspacing="0">
<tr>
<td class="aHeader" onclick='openEditActivity()' width="200"> <a
href="javascript:\\" onclick='TogglePost(<%#
((Employee)Container.DataItem).EmployeeId %>)'><%#((Employee)
Container.DataItem).FullName %></a></td>
<td class="aHeader" align="center" width="75"><%#
((Employee)Container.DataItem).EmployeeTypeId %></td>
<td class="aHeader" align="center" width="75"><%#
((Employee)Container.DataItem).TargetHours %></td>
<td class="aHeader" align="right" valign="top" width="75">Planned<br />
<img src="../img/spacer.gif" width="1" height="15"
border="0">Actual</td>
<td class="aHeader" align="center">
<asp:DataList ID=dlHours Width=100% CellPadding=0 CellSpacing=0
ItemStyle-HorizontalAlign=Center RepeatColumns='<%#
Convert.ToInt32(ddlPeriods.SelectedItem.Value)%>' RepeatDirection=Horizontal
DataSource='<%#
StaffMan.Periods.GetAll(0,Convert.ToInt32(ddlPerio ds.SelectedItem.Value),((Employee)Container.DataIt em).EmployeeId).Periods %>' Runat=server>
<ItemTemplate>
<table border="0" cellpadding="0" width="100%" cellspacing="0">
<tr>
<td align=center id=cellDate dt='<%#
((Period)Container.DataItem).PeriodDate.ToShortDat eString() %>'>
<asp:TextBox ID="txtPlanHours" Runat=server Text='<%#
((Period)Container.DataItem).PlanHours %>' Width=40 /></td>
</tr>
<tr>
<td align="center">
<asp:TextBox ID="txtActualHours" Runat=server Text='<%#
((Period)Container.DataItem).ActualHours %>' Width=40 /></td>
</tr>
</table>
</ItemTemplate>
</asp:DataList></td>
</tr>
</table>
</itemtemplate>
</asp:repeater>
/************************************************** *****/

Jul 21 '05 #1
0 3516

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

Similar topics

4
by: V. Jenks | last post by:
What seems like a simple thing is apparently not so straightforward? I have a datalist. Inside of that datalist is an <itemtemplate> secion which contains other server controls such as a...
0
by: Marty U. | last post by:
I have two datalists nested. On the ItemDataBound Event of the first datalist I databind the second with specific info. A couple questions: 1) How can I utilize the OnItemCommand of the nested...
3
by: Derek | last post by:
I have a nested datalist with a dropdownlist. I need to capture the selectedvalue of the dropdownlist so I can update a database table. My question then is...how do I get the value from the...
0
by: Chris | last post by:
I've been searching all over and think I am close, but keep getting the error "Index out of range" when trying to reference a nested datagrid when an OnEditCommand event is raised. When the...
3
by: Martin | last post by:
Hi, I have a very frustrating problem that I have researched for countless hours to no avail. There are many posts asking very similar things, however none usefull in my situation. I am using VS...
0
by: H5N1 | last post by:
Hi there My problem is that in when I update GridView row, which is nested into DataList control, I want to refresh also DataList in which the GridView is nested, since after update, trigger in...
0
by: Les Caudle | last post by:
I have a menu system composed of a DataList nested inside a DataList. The outer DataList has it's DataSource (composed of a DataSet with two tables linked by a CategoryPagesRelation Relation) set...
1
by: AJ | last post by:
Hi all, With the following code in mind : <asp:DataList ID="dlOne" DataKeyField="myField1" DataSource="<%# GetDataSource1()" Runat="server"> <ItemTemplate> Output Value Here! <asp:DataList...
3
by: mroffey | last post by:
Hi everyone, I've been having this problem and I've searched high and low, but I can't seem to find the answer to what is probably a very simple solution. In a nutshell, I have a nested...
2
by: Ole V.-M. | last post by:
Greetings, i have a UserControl, that contains a DataList. That DataList contains as items other DataLists. example: DataList A Row 1 Nested DataList 1 Row 1
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
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
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.