PC Review


Reply
Thread Tools Rate Thread

detect clicked column in datagrid

 
 
Sam
Guest
Posts: n/a
 
      4th Apr 2005
Hi,
How can I detect if the cell on which the user clicked, belong to which
column of my datagrid ?

say if the user clicks on a cell in the second column, I would be able
to detect it is the second column.

Thx

 
Reply With Quote
 
 
 
 
Cor Ligthert
Guest
Posts: n/a
 
      4th Apr 2005
Sam,

datagridcell
http://msdn.microsoft.com/library/de...mberstopic.asp

in
Datagrid.item
http://msdn.microsoft.com/library/de...sitemtopic.asp

I hope this helps,

Cor


 
Reply With Quote
 
Sam
Guest
Posts: n/a
 
      4th Apr 2005
not really
my main issue here is to detect the mouse click on a cell, and then to
figure out which column it belongs to.
thx

 
Reply With Quote
 
Sam
Guest
Posts: n/a
 
      4th Apr 2005
I found out :


intcolNum = dataGrid1.CurrentCell.ColumnNumber;

int rowNum = dataGrid1.CurrentCell.RowNumber;

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Detect which shape was clicked? Thief_ Microsoft Excel Programming 1 15th Jul 2005 03:53 AM
DataGrid: How to know which column header is clicked? =?Utf-8?B?TmFk?= Microsoft Dot NET Framework Forms 2 21st Apr 2005 05:41 PM
know the MappingName of a clicked Column in a Parent-Child DataGrid DraguVaso Microsoft VB .NET 0 17th Aug 2004 04:48 PM
know the MappingName of a clicked Column in a Parent-Child DataGrid DraguVaso Microsoft ADO .NET 0 17th Aug 2004 04:48 PM
Detect which button was clicked? =?Utf-8?B?RGF2ZQ==?= Microsoft ASP .NET 3 26th Feb 2004 07:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:40 AM.