Get reference to datagridview column from given coordinates.  
Author Message
amehra





PostPosted: Mon Jan 23 15:00:47 CST 2006 Top

Winforms >> Get reference to datagridview column from given coordinates. Does anyone know a method to retrieve a reference to the datagridview
column that contains given client coordinates?

Essentially I am trying to implement drag and drop functionality from a

listbox to a datagridview. In this case I am using an item dragged from

the listbox into the datagridview to rename the datagridview column
where that item is dropped.
I know how to implement the drag and drop functioanlity using events. I

just dont know how to get a reference to the actual column where the
item is dropped. So far I have gotten as far as being able to retrieve
the client coordinates in the datagridview of the actual drop point.
Anyone know how I can use those to get a reference to the column?


Thanks in advance for any help.

DotNet257  
 
 
Stoitcho





PostPosted: Mon Jan 23 15:00:47 CST 2006 Top

Winforms >> Get reference to datagridview column from given coordinates. jjeffers1,

Look at DataGrid's HitTest method. It should give you everything you want.


--
HTH
Stoitcho Goutsev (100)


<EMail@HideDomain.com> wrote in message
news:EMail@HideDomain.com...
>
> Does anyone know a method to retrieve a reference to the datagridview
> column that contains given client coordinates?
>
> Essentially I am trying to implement drag and drop functionality from a
>
> listbox to a datagridview. In this case I am using an item dragged from
>
> the listbox into the datagridview to rename the datagridview column
> where that item is dropped.
> I know how to implement the drag and drop functioanlity using events. I
>
> just dont know how to get a reference to the actual column where the
> item is dropped. So far I have gotten as far as being able to retrieve
> the client coordinates in the datagridview of the actual drop point.
> Anyone know how I can use those to get a reference to the column?
>
>
> Thanks in advance for any help.
>


 
 
jjeffers1





PostPosted: Mon Jan 23 15:28:30 CST 2006 Top

Winforms >> Get reference to datagridview column from given coordinates.
Stoitcho Goutsev (100) wrote:
> jjeffers1,
>
> Look at DataGrid's HitTest method. It should give you everything you want.
>
>
> --
> HTH
> Stoitcho Goutsev (100)

Stoitcho - Thank you so much! It went through intellisense several
times but somehow missed this method.