Forum Discussion

rancohen's avatar
rancohen
Occasional Contributor
6 years ago

Listview sub items

Hi,

 

how can I test Listview control with sub Items.

I need to test that the content of the sub item is OK, like the Tag peoperty or the Text property of the listviewsubitem.

when I press the Items property I see button with "param" but nothing happens.

 

Thanks,

Ran

 

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    You will most likely need to loop through the items and check their values.  Most likely your list view has an item count property or something... use that as the upper limit on a for loop.  Then loop through that Item property, replacing the parameter with the loop index and do your validation comparison there.

    • rancohen's avatar
      rancohen
      Occasional Contributor
      Hi Robert,

      It seems that I don't have access to sub items property of the listview.
      I don't know how to access them. I can access only the item.

      Do you know about any example?

      Ran
      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        I think the same strategy will work...  you have items... and, if there are sub items, those items will have a similar Item property with a parameter... and so on down the line.  It will probably have to be nested for loops in the end but I think it should still work.