PC Review


Reply
Thread Tools Rate Thread

DataGrid Cell Location

 
 
Angel Montesinos
Guest
Posts: n/a
 
      17th Feb 2004
How can I know the exact location of a cell?

Thanks.


 
Reply With Quote
 
 
 
 
William Ryan eMVP
Guest
Posts: n/a
 
      17th Feb 2004
What do you mean by exact location? You can find the current row and
current column by using the CurrentCell property and you can use HitTest to
detect the mouse coordinates.

HTH,

Bill
"Angel Montesinos" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How can I know the exact location of a cell?
>
> Thanks.
>
>



 
Reply With Quote
 
Alex Feinman [MVP]
Guest
Posts: n/a
 
      17th Feb 2004
There is a method - DataGrid.GetCellBounds()
Also, take a look at http://www.opennetcf.org/Forums/topic.asp?TOPIC_ID=245

"Angel Montesinos" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> How can I know the exact location of a cell?
>
> Thanks.
>
>



 
Reply With Quote
 
Angel Montesinos
Guest
Posts: n/a
 
      17th Feb 2004
No, but I have find the solution:

Rectangle cellPos = dataGrid1.GetCellBounds(dataGrid1.CurrentCell.RowNumber,
dataGrid1.CurrentCell.ColumnNumber);



"William Ryan eMVP" <(E-Mail Removed)> escribió en el mensaje
news:(E-Mail Removed)...
> What do you mean by exact location? You can find the current row and
> current column by using the CurrentCell property and you can use HitTest

to
> detect the mouse coordinates.
>
> HTH,
>
> Bill
> "Angel Montesinos" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > How can I know the exact location of a cell?
> >
> > Thanks.
> >
> >

>
>



 
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
DataGrid cell/row location? Zanna Microsoft Dot NET Compact Framework 0 4th Mar 2004 05:28 PM
DataGrid Cell: Custom Font/Backcolor/Format cell by cell (VB.NET) DraguVaso Microsoft ADO .NET 7 28th Jan 2004 09:04 PM
DataGrid Cell: Custom Font/Backcolor/Format cell by cell (VB.NET) DraguVaso Microsoft Dot NET Framework Forms 5 7th Jan 2004 09:09 PM
DataGrid Cell: Custom Font/Backcolor/Format cell by cell (VB.NET) DraguVaso Microsoft VB .NET 2 19th Dec 2003 10:03 PM
Links in web datagrid - letting a user click on a datagrid cell VM Microsoft C# .NET 1 18th Aug 2003 02:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:56 AM.