473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Detect Right Click in ColumnHeader

Hi all,

In my project I have a ListView and a ColumnClick event is added to
sort the clicked column. I want to have a Context Menu when the
ColumnHeader is right clicked, but I find no way to detect the right
click of ColumnHeader.

I wonder if someone can give me some hints or suggestions. Thanks
:)

Joanne
Nov 16 '05 #1
1 2384
Hi,

You can do it in the "MouseDown" event handler by the DataGrid's
(Windows) method: HitTestInfo HitTest(int x, int y)
-remember to check right mouse button

HitTestInfo should provide any wanted information for you.

Regards

Marcin
Hi all,

In my project I have a ListView and a ColumnClick event is added to
sort the clicked column. I want to have a Context Menu when the
ColumnHeader is right clicked, but I find no way to detect the right
click of ColumnHeader.

I wonder if someone can give me some hints or suggestions. Thanks
:)

Joanne

Nov 16 '05 #2

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

Similar topics

22
by: DJ WIce | last post by:
Hi, I'm looking for a script to get the hi-est z-index on a page. I want my javascript menu to be always on top of the page (moves along on top when you scroll down). Does anyone know how to...
19
by: lihua | last post by:
Hi, Group! I got one question here: We all know that fclose() must be called after file operations to avoid unexpected errors.But there are really cases when you forget to do that!Just like...
4
by: Alan Seunarayan | last post by:
Hello, I have a number of ColumnHeaders that are 'hidden' (width set to zero). However, it is still possible to size them. The reason why they are hidden is to give the illusion that they do...
0
by: Shravan | last post by:
Hi, I saw that in Windows Forms DataGrid with new row creation set to true, if I have added a new row earlier which was empty and deleted the row and shifted the focus to any other control and...
1
by: Lalit Bhatia | last post by:
Hi when focus is on a cell in datagrid. double click event does not occur. when I double click on rowheader, columnheader then this event fires. I am using DataGridTableStyle in the grid. ...
1
by: Manny Chohan | last post by:
hi Guys, i want to implement the double click functionality in datagrid. I am using c#. can some one recomend a good article whihc shows you how to do it. Thanks Manny
10
by: babis | last post by:
I work with .NET2003 C# windows form application, i add a datagrid in my form like this: dataGridProduct.DataSource = dataViewProduct; I also make the allowSort property of the datagrid...
3
by: rchak2k | last post by:
Hi! I have to capture the event of mouse right click menu selection. e.g. I need to capture the event if someone click the "close X" option displayed at the bottom of the right click menu. Any...
3
by: =?Utf-8?B?WVhR?= | last post by:
I have set the names of each column on design-time, but the code below could not get their names, why? thank you. //////////////////////////////////////////////////////////////////////// For...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...

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.