472,353 Members | 1,222 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

Retrieveing values from a listview

Eva
hi,

can anyone tell me how i can retrieve specific values from
a listview?

i have created 6 columns that will contain values that are
added on an onclick event for a button. These values are
ontained from the user via textboxes, comboboxes etc.
Jul 21 '05 #1
3 2531
In VB.NET:
ListView1.SelectedItems(0).SubItems(0).Text

In C#
ListView1.SelectedItems[0].SubItems[0].Text

In Cobol.NET
;-) Just kidding!

Is this what you are looking for?

--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Eva" <us@t> schreef in bericht
news:01****************************@phx.gbl...
hi,

can anyone tell me how i can retrieve specific values from
a listview?

i have created 6 columns that will contain values that are
added on an onclick event for a button. These values are
ontained from the user via textboxes, comboboxes etc.

Jul 21 '05 #2
eva
Hi Jan,
will this return the entire row or just an individual item
in the listview.
what i want is to be able to select each one individually.
am i better off using a datagrid for this or is it just as
easy in a listview?

thx.
-----Original Message-----
In VB.NET:
ListView1.SelectedItems(0).SubItems(0).Text

In C#
ListView1.SelectedItems[0].SubItems[0].Text

In Cobol.NET
;-) Just kidding!

Is this what you are looking for?

--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Eva" <us@t> schreef in bericht
news:01****************************@phx.gbl...
hi,

can anyone tell me how i can retrieve specific values from a listview?

i have created 6 columns that will contain values that are added on an onclick event for a button. These values are
ontained from the user via textboxes, comboboxes etc.

.

Jul 21 '05 #3
ListView1.SelectedItems[0] will return the entire row.
ListView1.SelectedItems[0].SubItems[0].Text will return the value of the
first column.

The advantage of a DataGrid is that you can bind directly to your data
objects, in a ListView you have to create ListViewItems and add them to the
list.

--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"eva" <an*******@discussions.microsoft.com> schreef in bericht
news:02****************************@phx.gbl...
Hi Jan,
will this return the entire row or just an individual item
in the listview.
what i want is to be able to select each one individually.
am i better off using a datagrid for this or is it just as
easy in a listview?

thx.
-----Original Message-----
In VB.NET:
ListView1.SelectedItems(0).SubItems(0).Text

In C#
ListView1.SelectedItems[0].SubItems[0].Text

In Cobol.NET
;-) Just kidding!

Is this what you are looking for?

--
Greetz,
Jan
__________________________________
Read my weblog: http://weblogs.asp.net/jan
"Eva" <us@t> schreef in bericht
news:01****************************@phx.gbl...
hi,

can anyone tell me how i can retrieve specific values from a listview?

i have created 6 columns that will contain values that are added on an onclick event for a button. These values are
ontained from the user via textboxes, comboboxes etc.

.

Jul 21 '05 #4

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

Similar topics

6
by: Brian Henry | last post by:
is there a way to tell when the database connection is retrieveing data? i saw the connectionstate.fetching enumerated value, but of course it's not...
1
by: Jonesgj | last post by:
Hi, First time I am using this control in lieu of a listbox, and I want to be able to get values and row positions back ... I seem to be able to...
3
by: Eva | last post by:
hi, can anyone tell me how i can retrieve specific values from a listview? i have created 6 columns that will contain values that are added...
2
by: jediknight | last post by:
Hi, I have a listview which has columns of text and columns of numerical data. I need to be able to sort these columns into ascending/desending...
6
by: Michael.Suarez | last post by:
Consider the TextBox Control. It has a KeyPress event of type KeyPressEventHandler which passes a KeyPressEventArgs to whatever method is assigned...
5
by: = poster = | last post by:
Hi all , I have the following problem : $some_query = mysql_query( "SELECT table1.id, table1.category, table1.author, table1.title,...
1
by: svsenthilkumar | last post by:
how can i add 10 days with retrieveing date using php i retrieve a date from mysql table,and i add 10 days with that date and compare with today is...
2
by: =?Utf-8?B?UGhpbGlw?= | last post by:
I am attempting to insert a simple record with LinqDataSource from a ListView, however I always get a message saying "....LinqDataSource...
0
by: mesut | last post by:
Hi colleagues, I've a very strange problem here. I have no clue whyt it happens. I have a listview. The Listview populates well. I have an...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....

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.