Bug in .NET 2.0 with ListViews + TabControl

N

~~~ .NET Ed ~~~

I have discovered what is most likely a bug in Microsoft .NET 2.0. The bug
appears to result from a combination of controls. Here is my setup:

- Created a Windows form
- Added a TabControl to the form
- Added TabPage #1: Ranges
- Added TabPage #2: Groups

So far so good. Then

- Added a ListView control (View #1) to TabPage #1, named id lvRanges. It is
set NOT to display groups and the
view as Details.
- Added four columns to the View #1
- Added a ListView control (View #2) to TabPage #2, named it lvActive. It is
set to SHOW GROUPS and the
view as Small icons
- Defined a group named "Group1"
- Added an item to Group1 on View #2

OK, here is the bug. While working on Visual Studio C# Express the design
view shows both list view as they
should and expect to see them per the configuration. That is, View #1 shows
a grid of items in detail form whereas View #2 displays small icons in
Grouped fashion. No other things have been added, this is just the basic
setup without any extra logic.

And the bug is... start up the application and invoke the form that displays
the tab control that contains one list view per page. View #2 (Groups)
displays just fine but View #1 (details) no longer displays the column
headers nor the grid lines! that while it is configured to do so and shown
in the design view.

If you have only one list view then it is apparently fine.
 
N

~~~ .NET Ed ~~~

This is very weird. I recreated the whole form several times. I noticed VS
was leaving some rubish stuff there that had been removed. I had to manually
edit the .Designer source file to remove the rubish that was left over but
did not fix the issue.

I exited VS several times as well. Finally I removed the whole form, changed
and started it from scratch (time loss!!!). At first it seemed ok, it was
displaying the headers fine.

And then all of a sudden it does not display the headers anymore. This is
quite frustrating.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top