Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / June 2006

Tip: Looking for answers? Try searching our database.

ListView with Groups don't display all items

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Luiz Borges - 16 Jun 2006 11:28 GMT
I searched all over the internet for this, I can't believe no one
noticed that before.

Here is the problem, if you have a ListView with lots of items (just
enough get the vertical scroll bar on) and all the items belongs to one
Group (it can be the default Group) you can't navigate to the last two
items using the keyboard (End, Pagedown or Down arrow).

Here how to reproduce this:

1) put a ListView in a form

2) add this code to the FormLoad event

listView1.View = View.Details;
listView1.ShowGroups=true;
listView1.Columns.Add("column");
for (int i=0; i<40; i++) listView1.Items.Add(i.ToString());

3) now just try to get to the last item of the list using your
keyboard...

The same thing also happens in Explorer in Windows, just created a
folder full of files of the same Type and use Show Groups and Detail
mode...

How can I solve this bug????



Luiz Borges
Peter Ritchie - 16 Jun 2006 18:09 GMT
You are correct in your belief of no one noticing this before.  Someone has,
and it is logged in the Visual Studio and .Net Framework Feedback site with
ID 116853
(https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID
=116853
)

Signature

http://www.peterRitchie.com/

> I searched all over the internet for this, I can't believe no one
> noticed that before.
[quoted text clipped - 27 lines]
>
> Luiz Borges
Luiz Borges - 16 Jun 2006 22:46 GMT
Full code to reproduce the problem:

using System;
using System.Collections;
using System.Windows.Forms;

namespace WindowsApplication
{
   public class Form1 : Form
   {
       private ListView listView1;

       static void Main()
       {
           Application.EnableVisualStyles();
           Application.Run(new Form1());
       }

       public Form1()
       {
           ListViewGroup group = new ListViewGroup("ListViewGroup");
           this.listView1 = new ListView();

           this.listView1.Columns.Add("Column");
           this.listView1.Dock = DockStyle.Fill;
           this.listView1.Groups.Add(group);
           this.listView1.View = View.Details;
           this.ClientSize = new System.Drawing.Size(300, 150);
           this.Controls.Add(this.listView1);
           this.Text = "ListView GroupTest";
           this.ResumeLayout(false);
           for (int i = 0; i < 40; i++)
               listView1.Items.Add(i.ToString());
       }
   }
}

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.