|
-
Feb 12th, 2004, 03:25 AM
#1
Thread Starter
Junior Member
C# and Datagrid
Hi!
I am new in C#.
I am using a datagrid. Is it possible to find out in which cell I have clicked. And is it possible to highlight it? Or change the content of the cell.
Does anybody know a good tutorial for C# ?
Thanks for help !!!
-
Feb 26th, 2004, 08:22 PM
#2
Re: C# and Datagrid
Originally posted by AngryT
Hi!
I am new in C#.
I am using a datagrid. Is it possible to find out in which cell I have clicked. And is it possible to highlight it? Or change the content of the cell.
Does anybody know a good tutorial for C# ?
Thanks for help !!!
Yes you will have to use HitTest method.
Code:
Point pt = new Point(e.X, e.Y);
DataGrid.HitTestInfo hti = dgContact.HitTest(pt);
MessageBox.Show (hti.Column.ToString() + " " + hti.Row.ToString());
As for Tutorial check this, http://www.c-sharpcorner.com/Tutorials.asp
[VBF RSS Feed]
There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.
If I have been helpful, Please Rate my Post. Thanks.
This post was powered by : 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|