Ranorex

Can't get item text of listview via GetItemText Method

 
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexNet
View previous topic :: View next topic  
Author Message
sanliuus



Joined: 06 May 2008
Posts: 2

PostPosted: Thu May 29, 2008 6:00 am    Post subject: Can't get item text of listview via GetItemText Method
Hi,

I want to get the item text of a listview control. Here is the code.
Code: click into code to enlarge

for (int i = 0; i < listview.ItemCount; i++)
{
  for (int j = 0; j < listview.ColumnCount; j++)
  {
     Console.WriteLine("Item[{0}, {1}]= {2}", i, j, cntctList.GetItemText(i, j));
   }
}


But all printout is null. I can get the correct ItemCount and ColumnCount. Any body know what's wrong with my code?

Thanks & Regards!
Back to top
View user's profile Send private message
Support Team
Site Admin


Joined: 07 Jul 2006
Posts: 293

PostPosted: Thu May 29, 2008 4:38 pm    Post subject:
What kind of listview is it (Win32, .NET System.Windows.Forms, ...)? Could you please post its classname!

Have you tried the ListView.SelectItem(string) method?

Alex
Ranorex Support Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexNet All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum