473,549 Members | 2,531 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Retrieving Data from DataRepeater

Hi, i'm having a bit af trouble with a datarepeater of mine.
It shows the data that I want, but i've also implemented an
Imagebutton
that, when clicked, needs to retrieve the information
from the line I clicked so it can be altered.

This is the HTML code of the repeater:
<asp:Repeater id=repArticles runat="server">

<HeaderTemplate >
<TR>
<TD>&nbsp;</TD>
<TD class="pinktabl ecell">Artikel</TD>
<TD class="pinktabl ecell">Naam</TD>
</TR>
</HeaderTemplate>
<ItemTemplate >
<TR>
<TD class="unvisibl e"><%# DataBinder.Eval (Container.Data Item,
"Article") %></TD>
<TD class="Plain">< %# DataBinder.Eval (Container.Data Item,
"ArticleVal ue") %></TD>
<TD class="Plain">< %# DataBinder.Eval (Container.Data Item, "Name")
%></TD>
<TD>
<asp:ImageButto n ID="ibtEditNote " Runat="server"
ImageUrl="Image s/Animated/insertrule.gif"
CommandName="Ed itNote"></asp:ImageButton >
<asp:ImageButto n ID="ibtViewComm ent" Runat="server"
ImageUrl="Image s/arrowDown.gif"
CommandName="sh owComment"></asp:ImageButton >
</TD>
</TR>
<asp:Panel ID="pnlRepeater " Runat="server" Visible="False" >
<tr>
<td>&nbsp;
</td>
<td class="Plain" colspan="3"><%#
DataBinder.Eval (Container.Data Item, "ExplanatoryNot e") %>
</td>
</tr>
</asp:Panel>
</ItemTemplate>
</asp:Repeater>

The first imagebutton is the one that retrieves the info
the second button simply makes the panel visible and invisible.

private void repArticles_Ite mCommand(object source,
System.Web.UI.W ebControls.Repe aterCommandEven tArgs e)
{
if((e.Item.Item Type == ListItemType.It em) || (e.Item.ItemTyp e ==
ListItemType.Al ternatingItem))
{
if(e.CommandNam e == "EditNote")
{
this.pnlEditNot e.Visible = true;
rtbEditNote.Tex t = ((DataBoundLite ralControl)e.It em.Controls[0]).Text.ToString ();
}
}
}
I tried retrieving through the DataboundLitera lControl, but that does
not work.
If I call the first control this way i get both Article and
ArticleValue (the first two columns of the repeater). I tried other
methods as well, but nothing seems to work.

Kind Regards
Dirk Vervecken
Nov 18 '05 #1
0 930

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

Similar topics

3
3354
by: | last post by:
Hi, NG! Is there any updated version (.Net) of the Datarepeater control or do I have to use the old (VS6.0) version? Thanks. pax
0
720
by: Dirk Vervecken | last post by:
Hi, i'm having a bit af trouble with a datarepeater of mine. It shows the data that I want, but i've also implemented an Imagebutton that, when clicked, needs to retrieve the information from the line I clicked so it can be altered. This is the HTML code of the repeater: <asp:Repeater id=repArticles runat="server"> <HeaderTemplate>
2
2053
by: Neven Klofutar | last post by:
Hi, How can I bind ArrayList of my object to DataRepeater ? I have 2 classes: public class Movie { private String _Name = ""; private Double _Price = 0;
1
1539
by: Chris Leffer | last post by:
Hi. I have a DataRepeater that is filled with the results of a query based on four criteria fields. If one of these criterias is informed, I don't need to display a certain column in my DataRepeater. I can do that using an If expression on the HTML to conditionally show the column, but is it possible to do that using code-behind only? ...
3
1877
by: Stephen | last post by:
Hi, Does anyone have a sample of a DataRepeater with Radiobuttons? I am trying to have a datarepeater with radiobuttons but for some reason (suppose there are 10 rows) only the first row has a radiobutton and none other Thanks, Stephen
1
9436
by: jimmyfo | last post by:
Hi, I recently wrote an ASP.Net web application in VS2005 and published (using VS2005 Publish feature) it to a relatively clean machine with ASP.Net 2.0 and MDAC 2.8 installed on it. However, when I try to create my SQL connection in the code-behind, I get the following error. I tried to register the DLL using regsvr32 but that errored out...
0
1226
by: Robert Bravery | last post by:
Hi all, Newbie here learnig C# and ASP programming I have a webpage (aspx) that make use of a datarepeater. In the data repeater items I have variaus different bound items, like textboxes, checkboxes. Which enable the user to edit the given row. I want to at the end, add a button to commit theses changes to the database. Thanks Robert
5
1964
by: Sanjay Pais | last post by:
I have a table with over 1.3 million rows. I am retrieving only 20 at a time using the with - over clauses In query analyser, the data is retrieved in under a second. When retrieving using the data adaptor.fill or datareader to retrieve the data it takes over 24 seconds. public System.Data.SqlClient.SqlDataReader List1(int PageIndex, int...
2
2162
by: Tony K | last post by:
I downloaded the new VB PowerPack 3.0 and began using the DataRepeater. I have 2 DateTimePickers, current and future. When I add a new item, to the datarepeater, I want to automatically add 1 year to the future DateTimePicker. The DataRepeater contains fields from the Service table of my DataSet. Here is my code. Try...
0
7526
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7457
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7965
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7483
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6051
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5375
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5092
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3504
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3487
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.