473,395 Members | 2,437 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.

Getting DataItem from a RepeaterItem

first, thx to martin for helping me with my initial post. im a newbie
and appreciate the help.

if someone can help me with another question, please do.

i have a repeater pulling job information from a database. each repeater
itemtemplate has with a linkbutton and a row with a label (for now).

<asp:repeater ID="EmployeeInfo" OnItemCommand="getActivityList"
runat="server">

<itemtemplate>
<tr bgcolor="#CCCCCC">
<td><%# Container.DataItem(0)%></td>
<td><%# Container.DataItem(1)%></td>
<td><%# Container.DataItem(2)%></td>
<td><%# Container.DataItem(3)%></td>
<td><%# Container.DataItem(4)%></td>
<td><asp:linkbutton Text=<%# Container.DataItem(5)%>
runat="server"/></td>
</tr>
<tr>
<td><asp:label id="litLabel" Runat="Server" Text="labelti"
Visible="false"/></td>
</tr>
</itemtemplate>

when u click on the linkbutton, the label(eventually it will be a
placeholder with more database info in another repeater) will become
visible with detailed info bout the job.

the first Container.DataItem(0) has an ID number that I need to extract
and send to the stored procedure. how can i extract that dataItem. ive
been able to loop throw the items in the repeater item and extract the
entire row. i tried to convert that info to a DataBoundLiteralControl
and pull the text from it. but when i tried to use string functions to
pull the ID number or even get a length of string i could consistently
get what i need. i figured out that row is coded with <html> table and
row tags. thus, im back to trying to get the data from the first
container.dataitem. so, to make a long request even longer, what object
or class do i use to pull individual dataitems from an item. i looked at
the dataitem property from repeateritem class, but i cant get it to
work. again, thx for the help.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
2 2256
Your post went unanswered. Have you resolved this issue?

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"ric carrasquilla" <dj****************@yahoo.com> wrote in message
news:Oi*************@tk2msftngp13.phx.gbl...
first, thx to martin for helping me with my initial post. im a newbie
and appreciate the help.

if someone can help me with another question, please do.

i have a repeater pulling job information from a database. each repeater
itemtemplate has with a linkbutton and a row with a label (for now).

<asp:repeater ID="EmployeeInfo" OnItemCommand="getActivityList"
runat="server">

<itemtemplate>
<tr bgcolor="#CCCCCC">
<td><%# Container.DataItem(0)%></td>
<td><%# Container.DataItem(1)%></td>
<td><%# Container.DataItem(2)%></td>
<td><%# Container.DataItem(3)%></td>
<td><%# Container.DataItem(4)%></td>
<td><asp:linkbutton Text=<%# Container.DataItem(5)%>
runat="server"/></td>
</tr>
<tr>
<td><asp:label id="litLabel" Runat="Server" Text="labelti"
Visible="false"/></td>
</tr>
</itemtemplate>

when u click on the linkbutton, the label(eventually it will be a
placeholder with more database info in another repeater) will become
visible with detailed info bout the job.

the first Container.DataItem(0) has an ID number that I need to extract
and send to the stored procedure. how can i extract that dataItem. ive
been able to loop throw the items in the repeater item and extract the
entire row. i tried to convert that info to a DataBoundLiteralControl
and pull the text from it. but when i tried to use string functions to
pull the ID number or even get a length of string i could consistently
get what i need. i figured out that row is coded with <html> table and
row tags. thus, im back to trying to get the data from the first
container.dataitem. so, to make a long request even longer, what object
or class do i use to pull individual dataitems from an item. i looked at
the dataitem property from repeateritem class, but i cant get it to
work. again, thx for the help.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #2
yes, thx for the offer. martin helped me out. it's great to see the
asp.net community is helpful and sticks together.

ric

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3

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

Similar topics

0
by: mrwoopey | last post by:
I did not see code for getting all values from a repeater control posted anywhere. So, I figured it out and I am posting for the next person that may need it (sorry if this seems obvious to you): ...
1
by: Peter Rilling | last post by:
In the Repeater.ItemCreated handler, I am hooking the RepeaterItem.PreRender method. This event fires when the RepeaterItem is being rendered, the problem is that I want access to the DataItem...
1
by: jw56578 | last post by:
What is the explanation for the following. if i do: reapeter1.datasource = somedatasource repeater1.databind() foreach(RepeaterItem ri in repeater1.Items) { object o = ri.DataItem; }
7
by: charliewest | last post by:
Hello - I'm using a Repeater control to render information in a very customized grid-like table. The Repeater control is binded to a DataSet with several records of information. Within the...
4
by: jim.long | last post by:
I can't seem to get the checked value from the checkboxes! Is there something wrong with the code? It loops through the repeater item collection correctly. HTML: <asp:repeater id="rPrinterJobs"...
3
by: renil | last post by:
I have a repeater control that displays info. from a datatable. Each row in the repeater has a checkbox. Also, I have a delete linkbutton outside the repeater control. What I'm trying to do when...
3
by: champ.supernova | last post by:
I have a repeater containing dropdownlists. This subroutine is called when the selected index on one of these dropdownlists is changed... Public Sub cmbProductType_SelectedIndexChanged(ByVal...
4
by: adiel_g | last post by:
I am trying to loop through a repeater to retrieve a dataitem field but am getting a NullReferenceException. I can find a checkbox control but cannot find a dataitem field. Here is the code that...
0
by: wilkinsonr | last post by:
Hi All, I'm having a metal blank. This is my class: public class MyRepeaterItem : System.Web.UI.WebControls.RepeaterItem { public MyRepeaterItem(int itemIndex, ListItemType itemType) :...
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:
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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:
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.