Is it a bug in ListView ?  
Author Message
GEO_GR





PostPosted: .NET Compact Framework, Is it a bug in ListView ? Top

I have a problem with ListView in my application for .NET Compact Framework.

Try to follow this:

  • Open a new Smart Device Project (The language is not important. Choose what you prefer, VB or C#)

  • Drop into the form the ListView (listView1) control and go to its properties.

  • In Columns property add 2 columns and empty the Text property of each column.

  • Drop into the form the Button control (Button1) and double-click it to go to its Click event.

  • Write this code:

Visual C#

MessageBox.Show(listView1.Columns[0].Text);

Wisual Basic .NET

MsgBox(listView1.Columns(0).Text)


Build and run the application. Click on the Button. It throws an exception (Exception).

In .NET Framework this code works pretty well without any exception. I'm wondering is it a bug in .NET Compact Framework ListView realization

P.S.: I work with Visual Studio .NET 2005 Professional Edition.



Smart Device Development16  
 
 
Alex Feinman





PostPosted: .NET Compact Framework, Is it a bug in ListView ? Top

Yes, looks like a bug. Reproducible on both CF 2.0 RTM and SP1. You will need to report it via Connect:

http://connect.microsoft.com/VisualStudio/Feedback

(Requires registration)



 
 
d_elliott





PostPosted: .NET Compact Framework, Is it a bug in ListView ? Top

This bug has been verified and reported. A work-around is to use a string consisting of a single space rather than an empty string.

HTH

Dan