Re: Visual Studio 2003, Watch Window, ListView, SubItems
- From: "Steven Nagy" <learndotnet@xxxxxxxxxxx>
- Date: 26 Mar 2006 18:20:07 -0800
By the way, when I expand the SubItems item, next to Item it says
<cannot view indexed property>.
So it sounds like you ARE watching the ListView, but can't get to the
sub items, correct?
When you get this error, you can use the Count or Length properties to
see how many items are in the collection, and then reference them
directly.
Ie. MyListView.Items(0).SubItems(1)
You can type this directly into the Watch window.
Also you could always write out the object information to a log file or
console.
This works in VS2003
In the case of Datarows, you can just use the ItemArray property
instead of the default indexer to view all the items at once.
Worse case you could always inherit from whatever object you are having
trouble viewing and expose your own ItemArray property.
Hope this helps,
SN
.
- References:
- Visual Studio 2003, Watch Window, ListView, SubItems
- From: jeffbernstein@xxxxxxxxx
- Visual Studio 2003, Watch Window, ListView, SubItems
- Prev by Date: Visual Studio 2003, Watch Window, ListView, SubItems
- Next by Date: Re: Deployment without Framework?
- Previous by thread: Visual Studio 2003, Watch Window, ListView, SubItems
- Index(es):