473,804 Members | 3,424 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't retrieve text from DataListItem in DataList ...

.... but I can get the numerical index using the ItemIndex property.
Can anyone tell me how to get the text i.e. the data that is listed in
the datalist and that is output in the browser?

I've seen similar questions here but can't seem to find an answer.

I can get the ItemIndex by using:

myDataListItem. ItemIndex

and was hoping there would be a:

myDataListItem. Text

property.

Thanks,

Phil
Nov 18 '05 #1
1 1733
Hi,

DataListItem has not Text property. DataListItem only contains controls,
so you may use DataListItem.Co ntrols(index) to get the handle of that
control. And then use that control's relevent property to get Text.

--
Juno
MCSD.NET, MCDBA, MCSE
----------------------------------------------------------
Support Team of EasyDotNet, INC. http://www.EasyDotNet.com
DataForm.NET - The most powerful data entry web server control for ASP.NET

"Phil Corrin" <ph********@gma il.com> wrote in message
news:63******** *************** **@posting.goog le.com...
... but I can get the numerical index using the ItemIndex property.
Can anyone tell me how to get the text i.e. the data that is listed in
the datalist and that is output in the browser?

I've seen similar questions here but can't seem to find an answer.

I can get the ItemIndex by using:

myDataListItem. ItemIndex

and was hoping there would be a:

myDataListItem. Text

property.

Thanks,

Phil

Nov 18 '05 #2

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

Similar topics

0
1680
by: Homa | last post by:
Hi, I have a nested DataList, say a datalist of customer (outer) and order (inner). for the inner DataList, I want to get the idCustomer in DataBinding time. How to I access to this information? parent.NamingContainer? Thanks for concern, Homa Wong
1
10932
by: bill yeager | last post by:
I have a datagrid control within a datalist control. When I try and do a "Find" on the control, the object comes back with nothing and then my pgm crashes. I am 100% sure that my datagird inside my datalist has an id of "Datagrid3". dgChild comes back with "Nothing" while debugging. Here is my code in the itemdatabound event for the datalist: <code>
1
1757
by: bill yeager | last post by:
I did some more debugging and found the following: 1) I placed the following code in the button event just to see if I could cycle thru the datagrid control collection: <code> Dim strhello As String Dim myDataListItem As DataListItem Dim myDatagridItem As DataGridItem Dim myCheckBox As CheckBox
5
1212
by: jack | last post by:
Hello, I have an Editable Datalist with a DropDownList. I can get the Get value, but can't Set the Current Value set to the value of the current Edited Item. Thanks, Jack
2
1536
by: tshad | last post by:
How do I tell how many controls there are in a datalistitem? For example I am going through my datalistitems and dealing with the controls: for each oItem as DataListItem in DataList1.Items oItem.Controls? Thanks,
2
1033
by: tshad | last post by:
I just found an interesting anomaly that I had not seen before. It seems to affect both Datalist and Datagrids. If you set the background color of the DataGrids using CSSClass (which is valid) instead of using backcolor, you cannot programmatically set the color of the datalistitem or datagriditem. I was doing this to indicate which row the user wanted to move. I would set the color as green. But I found that every other color would...
7
2234
by: Mirek Endys | last post by:
Hello, the problem I have now, is: Im binding generic collection based on List<iDB2SQLTransferItem> // iDB2SQLTransferItem is my class // into WebCOntrol DataList. But the DataItem of the DataListCommandEventArgs is null. Here is my code: private MyData.iDB2SQLTransfers transfers = null;
1
1094
by: Mirek Endys | last post by:
I need to know, how to bind data into DataList, that is placed in another DataList in SelectedItemTemplate. I tried to FindControl on ItemCreated event, on PageLoad event, but I cannot get this control??? How to do this??? Thanks Mirek
0
1167
by: rodchar | last post by:
hey all, i was just wondering if there was a way to sort my datalist items without rebinding to the datasource? thanks, rodchar
0
9706
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10569
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10315
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9140
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7615
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6847
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.