P
Pantokrator
Hi,
I've searched the web and MSDN but couldn't find adequate information
on retrieving the text of a subitem of a listviewitem.
What I want to do is simple. I have a listview control with 2 columns
and a large number of listviewitems.
Every time I click on a row (one of the listviewitems), I would like
to get the String* representation of the second column cell.
First I get the index as follows:
int ind=0;
for (int j=0; j<listView1->Items->Count; j++)
{
if (listView1->Items->Item[j]->Selected)
ind = listView1->Items->Item[j]->Index;
}
Then, I get my listviewitem pointer as follows:
ListViewItem* item = listView1->Items->Item[ind];
if I write:
item->Text;
it will return me the string of the first column
What do I do after that in order to get the String* type of the second
subitem??
Many thanks in advance
I've searched the web and MSDN but couldn't find adequate information
on retrieving the text of a subitem of a listviewitem.
What I want to do is simple. I have a listview control with 2 columns
and a large number of listviewitems.
Every time I click on a row (one of the listviewitems), I would like
to get the String* representation of the second column cell.
First I get the index as follows:
int ind=0;
for (int j=0; j<listView1->Items->Count; j++)
{
if (listView1->Items->Item[j]->Selected)
ind = listView1->Items->Item[j]->Index;
}
Then, I get my listviewitem pointer as follows:
ListViewItem* item = listView1->Items->Item[ind];
if I write:
item->Text;
it will return me the string of the first column
What do I do after that in order to get the String* type of the second
subitem??
Many thanks in advance