473,779 Members | 2,001 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ListView ColumnClick Event

Hi everyone,

I am trying to sort columns in a listview. When the user clicks on a
column I want to sort on that column. The kicker is, I don't know how
to trap for the column click for the listview. I have looked around
here on Deja, but have not been able to find code that works for me.
Whenever I put the code I will attach below I get the message, "The
expression ColumnClick you entered as the event property setting
produced the following error: Procedure declaration does not match
description of event or procedure having the same name"

I am using Access 2000 if this helps in answering my question.

Any help would be greatly appreciated.

The code I am using is:

Private Sub lstView_ColumnC lick(ByVal ColumnHeader As ColumnHeader)
If lcase(ColumnHea der.Text) = "name" Then
lstView.Sorted = True
lstView.SortKey = 0
End If
End Sub

Thanks in advance!
Nov 12 '05 #1
0 2456

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1741
by: rmorvay | last post by:
I have successfully integrated sorting in the listview control with the following code: Private Sub ListView_ColumnClick(ByVal sender As Object, ByVal e As System.Windows.Forms.ColumnClickEventArgs) Handles ListView.ColumnClick If ListView.Sorting = System.Windows.Forms.SortOrder.Ascending Then ListView.Sorting = System.Windows.Forms.SortOrder.Descending Else ListView.Sorting = System.Windows.Forms.SortOrder.Ascending
2
4201
by: Mad Joe | last post by:
Hello! Can someone help me, please? It's 6am, I don't have concentration, feel desperate and I have a deadLine for my project (exam at my university).. How can I display ListView onMouse Click event? Let's say that I just need a detailed view of columnHeaders. Somewhere in my code there is already prepared array:
0
943
by: VP | last post by:
hi, I have written a small app using c# which mimicks a windows folder. However I do not know how to change the background color of a column in a listview that a user clicks upon. I did manage to get a partial solution after viewing some sample code online. Now at the moment my solution doesnot color the entire column that the user clicks upon. The color is rather limited to the number of subitems accumulated. i.e., if the current...
1
1466
by: perspolis | last post by:
hi all I used a listview with RightToLeft property enabled. I have 2 questions 1-how can I show icon in right side of listview not let side? 2-I want to sort listview by clicking on it's columns..,how can I? thx in advance.
1
15019
by: neelu | last post by:
I have four columns in listview. SR Number Part# DES Qty Weight 59 9410106800 Nut 10 0.03 60 90304ge800 Helmet 5 0.325 61 9635439604 Cap 15 0.421 62 25340h1245 Shoes 2 0.001 I want that when I click on column part# it sort the list View
5
7281
by: billuy | last post by:
Is there a way to sort by a specified column in a listview? I'd like my users to be able to click on the column heading and have the listview sort by that column. Thanks, Billyb
2
1594
by: Randall Arnold | last post by:
I'm trying to fire the ColumnClick event for a Listview control remotely. Problem is, I'm not sure what parameters to pass. Here's the sub header for the event: Private Sub Files_listview_ColumnClick(ByVal sender As Object, ByVal e As System.Windows.Forms.ColumnClickEventArgs) Handles Files_listview.ColumnClick I'm *assuming* I can just use the listview control as the sender-- but I have no idea what to use for e. I've dug through...
6
4804
by: Dave | last post by:
VB6 has a SorkKey property that you can setup on the ListView control to tell the ListView what column to use for sorting. In .NET there is a Sort() method and a SortOrder property that you can use to manipulate the Sorting property. My question is how do I perform the same functionality as I do in VB6 setting the SortKey and SortOrder with the ListView. Dave
0
1238
by: da3vilgenius | last post by:
I have a listview and I'd like to be able to do some stuff on a right click event of the column header but the columnclick event only handles left clicks. I looked around on the net and found that in order to accomplish a right click on a listview column header, I need to subclass the listview class and override the WndProc function. I've never done this so I'm not sure how to do it. Does anyone have this done already or provide some sample...
0
9632
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9471
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10302
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10136
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8958
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6723
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5372
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5501
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2867
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.