473,405 Members | 2,349 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,405 software developers and data experts.

How to know which element was selected in a repeater?

Hi,

I must be missing something here. In a DataList and DataGrid I can use the
property DataKeys to identify the selected element and get to its values.
But I can't find a way to do the same in a Repeater.

Can anybody give me an idea how to this in a Repeater or point me to some
sample code?

Thanks

Hans

Dec 10 '05 #1
1 1393
Hi Hans,

Welcome to ASPNET newsgroup.
As for the repeater control dosn't have select function or event, it is the
expected behavior since compared to the other two template databound
controls (DataList and DataGrid....), repeater is a very simple one which
dosn't encapsulate those advanced data manipulating functionalities(like
row selecting, editing , updating.... method and events....).
And from repeater to DataList to Datagrid, the data manipulation ability
increase while the displaying customization(html template) ability
decrease.....

So if we'd like to manipulate data rows bound in the template control, we
suggest use DataList or datagrid.... And if we just want to displaying
some data and need complex customzing on html template, repeater is the
prefered choice....

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| From: Hans Merkl <rh*****@newsgroups.nospam>
| Subject: How to know which element was selected in a repeater?
| User-Agent: 40tude_Dialog/2.0.14.1
| MIME-Version: 1.0
| Content-Type: text/plain; charset="us-ascii"
| Content-Transfer-Encoding: 7bit
| Sender: rh*****@newsgroups.nospam
| Reply-To: rh*****@newsgroups.nospam
| Organization: RHM Media, LLC
| Date: Sat, 10 Dec 2005 12:55:09 -0500
| Message-ID: <1i*****************************@40tude.net>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: pcp0011547978pcs.anapol01.md.comcast.net 68.54.166.32
| Lines: 1
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP14.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:364028
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi,
|
| I must be missing something here. In a DataList and DataGrid I can use the
| property DataKeys to identify the selected element and get to its values.
| But I can't find a way to do the same in a Repeater.
|
| Can anybody give me an idea how to this in a Repeater or point me to some
| sample code?
|
| Thanks
|
| Hans
|
|

Dec 12 '05 #2

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

Similar topics

3
by: datactrl | last post by:
Hi, all How do I know the whole text of an INPUT element is selected? Jack
0
by: audipen | last post by:
Hi, I've facing a certain problem with selected item in the ClassView. Basically here is what I do - When the user right-clicks on an item in the ClassView ,he can select a pop-up menu...
0
by: Kannan.M.R | last post by:
Hi, I have a problem in assigning the selected value in the dropdown to a hidden control. It goes like this. I have a repeater control. In the repeater control’s item template, I have a...
0
by: Kannan.M.R | last post by:
hi, I have a repeater. In the item template of the repeater i have a place holder control. In the item databound event of the repeater, In a for loop, i create dropdowns and buttons in a loop and...
2
by: Kim | last post by:
I had no problem with compiling my webpage with the following statement added to the HTML view until recently: <asp:repeater id="rp1" runat="server"> <tr><td><%#...
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...
2
by: Rob Long | last post by:
Hi I have an HTML select element in my page and it's multiple property is disabled (one item at a time mode) but I still want to transfer all the items in the select to the server when the form...
3
by: blackrunner | last post by:
ERROR in my Query?! ERROR: Element GESCHLECHT is undefined in FORM. i think everything ok. Maby somebody can help me here Element GESCHLECHT is undefined in FORM. The error occurred...
0
by: CURTISLESPERANCE | last post by:
Hi, I have a radiobuttonlist within a nested repeater, resulting in multiple radiobuttonlists. On a button click how do I find out what those selected values of the radiobuttons were? Code...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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...
0
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,...

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.