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 / October 2004

Tip: Looking for answers? Try searching our database.

list view: why GetItemAt method does not work?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Linda Chen - 13 Oct 2004 21:01 GMT
I am using list view control, try to find the sub item
clicked by the mouse.Inside mouse_down method, I use
GetItemAt method but it always return me null value, here
is my sample code:

private void listView1_MouseDown(object sender,
MouseEventArgs e)
{
ListViewSubItem subItem =
                this.GetListViewSubItem
(this.listFileHistory, new Point(e.X, e.Y), 4);

            if (subItem != null)
            {
                string tmp = subItem.Text;
            }*/

            System.Windows.Forms.ListViewItem
item = this.listFileHistory.GetItemAt(e.X, e.Y);

            int aaaa = 0;
        }
Imran Koradia - 13 Oct 2004 21:10 GMT
Since you are asking for sub items, I assume you are using the 'Details'
view. Do you have the property 'FullRowSelect' set to true on the listview?
If not, make sure it is set to true since otherwise you will not be able to
get the sub items for the item.

hope that helps..
Imran.

> I am using list view control, try to find the sub item
> clicked by the mouse.Inside mouse_down method, I use
[quoted text clipped - 18 lines]
> int aaaa = 0;
> }

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.