Hi,
I've used the search function but i only found old topics and they didn't really help me.
I'm using Ranorex Studio 3.2.15734
I have an .NET Desktop Application (Framework 4.0).
In this App I've an listview(.Net Listview) and i would like to access the subitems of the listview items.
When I do this:
foreach (ListItem myitem in myListview.Items)
{
}
I only get the First Column Information. I need the Information of the Third Column. I tried, but I didn't find any subitems Properties.
In C# now i would loop trough "myitem" and check for specific Text.
Any suggestions what I'm doing wrong? If you know a Workaround it also would be ok
With regards,
Fabian
Listview Subitems
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Listview Subitems
Hi Fabian,
Please take a look at the following forum post, it could be helpful: forum post.
In order to analyze the issue in detail we would also need a Ranorex Snapshot file of your application when it is in the same state as it would be when you would execute the specific code.
Following link will show you how to generate a snapshot file:
Creating Ranorex Snapshot Files.
Regards,
Markus
Ranorex Support Team
Please take a look at the following forum post, it could be helpful: forum post.
In order to analyze the issue in detail we would also need a Ranorex Snapshot file of your application when it is in the same state as it would be when you would execute the specific code.
Following link will show you how to generate a snapshot file:
Creating Ranorex Snapshot Files.
Regards,
Markus
Ranorex Support Team
Re: Listview Subitems
Hi,
this is my Solution and it works!
The IList things didn't work. I recognized in Spy that there is a Table and with that Table it works fine.
this is my Solution and it works!
The IList things didn't work. I recognized in Spy that there is a Table and with that Table it works fine.
Code: Select all
bool Gefunden = false;
Table table = "/form[@controlname='FrmMain']/container[@controlname='panContentDummy']/container[@controlname='navUserMainFrameUserContainer']/container[@controlname='userStueckliste1']/container/table[@controlname='lvListe']";
Column SpalteArtikelnummer = table.Columns[2];
foreach(Cell zelle in SpalteArtikelnummer.Cells)
{
if (zelle.Text == "169007-164")
{
Gefunden = true;
}
}
if (Gefunden)
{
Report.Success("Erforderliche Artikelnummer 169007-164 war vorhanden");
}
else
{
Report.Warn("Erforderliche Artikelnummer 169007-164 war nicht vorhanden");
}
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Listview Subitems
Hi,
I am glad to hear that you were able to find a solution .
Regards,
Markus
Ranorex Support Team
I am glad to hear that you were able to find a solution .
Regards,
Markus
Ranorex Support Team