in a different app, i can grab the index of a ListBox, but when i try
it with a listview with only one column, i'm having issues.
the first line (string) below works as expected.
the second line (string), i want the index of the fField arraylist. i
just have a 0 in there
at this point...i would think there is something similar to indexing a
listbox,
such as lvProductSelection.SelectedIndex
string dTest =
lvProductSelection.SelectedItems[0].ToString().Replace("'", "''");
string iTest = fField[0].ToString().Replace("'", "''");
as usual, i'm probably making this harder than it needs to be.
i appreciate any input...
thanks everyone... 2 2296
hI,
The listview is different, you do not have the SelectedXXXX members
instead each ListViewItem has a Selected property.
You have to iterate to get the selected elements
"forest demon" wrote:
in a different app, i can grab the index of a ListBox, but when i try
it with a listview with only one column, i'm having issues.
the first line (string) below works as expected.
the second line (string), i want the index of the fField arraylist. i
just have a 0 in there
at this point...i would think there is something similar to indexing a
listbox,
such as lvProductSelection.SelectedIndex
string dTest =
lvProductSelection.SelectedItems[0].ToString().Replace("'", "''");
string iTest = fField[0].ToString().Replace("'", "''");
as usual, i'm probably making this harder than it needs to be.
i appreciate any input...
thanks everyone...
ignacio machin wrote:
hI,
The listview is different, you do not have the SelectedXXXX members
instead each ListViewItem has a Selected property.
You have to iterate to get the selected elements
"forest demon" wrote:
in a different app, i can grab the index of a ListBox, but when i try
it with a listview with only one column, i'm having issues.
the first line (string) below works as expected.
the second line (string), i want the index of the fField arraylist. i
just have a 0 in there
at this point...i would think there is something similar to indexing a
listbox,
such as lvProductSelection.SelectedIndex
string dTest =
lvProductSelection.SelectedItems[0].ToString().Replace("'", "''");
string iTest = fField[0].ToString().Replace("'", "''");
as usual, i'm probably making this harder than it needs to be.
i appreciate any input...
thanks everyone...
i got it figured out.
thanks for your input ignacio... This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jim McLeod |
last post by:
Dear Group
How am I going wrong with this drag and drop procedure..
private void ResourceList_ItemDrag(object sender, System.Windows.Forms.ItemDragEventArgs e
System.Windows.Forms.ListView...
|
by: Søren Reinke |
last post by:
Hi everyone.
In a little program i am writing i have a listview, i fill it with data from
an ArrayList which contains a lot of objects. The data for the columns are
differente fields in the...
|
by: Visual Systems AB \(Martin Arvidsson\) |
last post by:
Hi!
I'v been struggeling with removing selected items from a listview.
Anyone that can give me a piece of code that does this?
I am a newbee to this C# and cant figure it out....
Regards...
|
by: Mamatha |
last post by:
Hi
I have an application with listview.When i click on one
button the data will be displayed like this in the
listview:
colA colB colC
----- ----- ------...
|
by: Graham |
last post by:
Hi everyone
I have a form which contains a ListView control. The code
handles the SelectedIndexChanged event, and changes some
icons on some items in the ListView.
I've found that when I...
|
by: Santosh |
last post by:
Dear all ,
i am writting following code.
if(Page.IsPostBack==false)
{
try
{
BindSectionDropDownlist();
|
by: garyusenet |
last post by:
I have had no replies to my previous post so perhaps I didn't write it
good enough.
Please excuse new thread but i wanted to break from the last thread
hopefully this thread will be better.
...
|
by: =?Utf-8?B?R2lkaQ==?= |
last post by:
Hi,
I'm trying to get the index of a selected Item in ListView.
I'm using the SelectedItemChange Event, but i can't get the item index (like
in listbox for i.e).
How can i get the index?
...
|
by: =?Utf-8?B?TWlrZSBDb2xsaW5z?= |
last post by:
I have a listview that when I select an item, it populates a details view. I
want to show the item that was selected in the listview by changing it to
yellow. Trouble is, the selected item does not...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
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
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
| |