471,315 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Next Line of code is...?

I have a Windows datagrid, and I have finally figured out how to capture the
data in a particular cell on a mouse click:

DataGrid.HitTestInfo hitInfo = subsystemsDataGrid.HitTest(new Point(e.X,
e.Y));
subsystemsDataGrid.CurrentCell = new DataGridCell(hitInfo.Row,hitInfo.Column);
DataGridCell dc = subsystemsDataGrid.CurrentCell;
string txt = subsystemsDataGrid[dc].ToString();

Now I can do a switch statement and figure out which of three values I have.
What I need is the next line (or two) of code that will allow me to read
column 1 of the row that cell is in. I can select the row,

subsystemsDataGrid.Select(hitInfo.Row);

but how do I read column 1's value?

Thanks!

WhiteWizard (aka Gandalf)

--
MCSD.NET, MCAD, MCT
Feb 10 '06 #1
1 1238
Not to worry, I figured it out.
--
MCSD.NET, MCAD, MCT
"WhiteWizard" wrote:
I have a Windows datagrid, and I have finally figured out how to capture the
data in a particular cell on a mouse click:

DataGrid.HitTestInfo hitInfo = subsystemsDataGrid.HitTest(new Point(e.X,
e.Y));
subsystemsDataGrid.CurrentCell = new DataGridCell(hitInfo.Row,hitInfo.Column);
DataGridCell dc = subsystemsDataGrid.CurrentCell;
string txt = subsystemsDataGrid[dc].ToString();

Now I can do a switch statement and figure out which of three values I have.
What I need is the next line (or two) of code that will allow me to read
column 1 of the row that cell is in. I can select the row,

subsystemsDataGrid.Select(hitInfo.Row);

but how do I read column 1's value?

Thanks!

WhiteWizard (aka Gandalf)

--
MCSD.NET, MCAD, MCT

Feb 10 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Kiteman - Canada | last post: by
4 posts views Thread by AndrewM | last post: by
7 posts views Thread by fniles | last post: by
8 posts views Thread by Adil Akram | last post: by
reply views Thread by Semajthewise | last post: by
reply views Thread by rosydwin | last post: by

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.