Click here to Skip to main content
15,908,626 members
Home / Discussions / C#
   

C#

 
GeneralThis one should be easy.... Pin
MStanbrook2-Jan-03 15:57
MStanbrook2-Jan-03 15:57 
GeneralRe: This one should be easy.... Pin
jtmtv182-Jan-03 19:06
jtmtv182-Jan-03 19:06 
this might work for you.. im not to sure though because i have never used a data grid before. anyways,

(from clip board)
To determine which part of the control the user clicked, use the HitTest method in the MouseDown event. The HitTest method returns a DataGrid.HitTestInfo object, which contains the row and column of a clicked area.

[C#]
protected void dataGrid1_MouseDown
(object sender, System.Windows.Forms.MouseEventArgs e)
{
Console.WriteLine();
System.Windows.Forms.DataGrid.HitTestInfo myHitTest;
// Use the DataGrid control's HitTest method with the x and y properties.
myHitTest = dataGrid1.HitTest(e.X,e.Y);
Console.WriteLine(myHitTest);
Console.WriteLine("Column " + myHitTest.Column);
Console.WriteLine("Row " + myHitTest.Row);
Console.WriteLine("Type " + myHitTest.Type);
Console.WriteLine("ToString " + myHitTest.ToString());
Console.WriteLine("Hit " + myHitTest.Type.ToString());
}

ill keep looking till i find it out for sure though.

looking some more.. i think that you will have too manually tell the list box to select the other items on that row. good luck...tell me how it goes. (im curious myself now too).

GeneralRe: This one should be easy.... Pin
MStanbrook3-Jan-03 6:27
MStanbrook3-Jan-03 6:27 
GeneralMore on C# / DX9 Pin
Paul Riley2-Jan-03 12:09
Paul Riley2-Jan-03 12:09 
GeneralRe: More on C# / DX9 Pin
Paul Riley2-Jan-03 13:30
Paul Riley2-Jan-03 13:30 
GeneralRe: More on C# / DX9 Pin
Brian Olej2-Jan-03 13:47
Brian Olej2-Jan-03 13:47 
GeneralRe: More on C# / DX9 Pin
Paul Riley2-Jan-03 13:54
Paul Riley2-Jan-03 13:54 
GeneralRe: More on C# / DX9 Pin
Brian Olej2-Jan-03 14:19
Brian Olej2-Jan-03 14:19 
GeneralRe: More on C# / DX9 Pin
Paul Riley2-Jan-03 14:29
Paul Riley2-Jan-03 14:29 
GeneralRe: More on C# / DX9 Pin
Shock The Dark Mage2-Jan-03 14:29
Shock The Dark Mage2-Jan-03 14:29 
GeneralRe: More on C# / DX9 Pin
Paul Riley2-Jan-03 14:31
Paul Riley2-Jan-03 14:31 
GeneralRe: More on C# / DX9 Pin
Philip Fitzsimons2-Jan-03 21:39
Philip Fitzsimons2-Jan-03 21:39 
GeneralRe: More on C# / DX9 Pin
Andreas Philipson5-Jan-03 10:06
Andreas Philipson5-Jan-03 10:06 
GeneralRe: More on C# / DX9 Pin
Paul Riley5-Jan-03 10:20
Paul Riley5-Jan-03 10:20 
QuestionPassing an interface from C# to COM? Pin
Bog2-Jan-03 9:44
Bog2-Jan-03 9:44 
AnswerRe: Passing an interface from C# to COM? Pin
Anonymous2-Jan-03 10:10
Anonymous2-Jan-03 10:10 
AnswerRe: Passing an interface from C# to COM? Pin
James T. Johnson2-Jan-03 16:57
James T. Johnson2-Jan-03 16:57 
GeneralRe: Passing an interface from C# to COM? Pin
Bog2-Jan-03 17:13
Bog2-Jan-03 17:13 
Generalclosing a .exe from within a seperate .exe Pin
jtmtv182-Jan-03 8:25
jtmtv182-Jan-03 8:25 
GeneralRe: closing a .exe from within a seperate .exe Pin
Ranjan Banerji2-Jan-03 8:36
Ranjan Banerji2-Jan-03 8:36 
GeneralRe: closing a .exe from within a seperate .exe Pin
jtmtv182-Jan-03 8:48
jtmtv182-Jan-03 8:48 
GeneralRe: closing a .exe from within a seperate .exe Pin
Ranjan Banerji2-Jan-03 9:00
Ranjan Banerji2-Jan-03 9:00 
GeneralRe: closing a .exe from within a seperate .exe Pin
-G-4-Jan-03 6:28
-G-4-Jan-03 6:28 
GeneralRe: closing a .exe from within a seperate .exe Pin
Nick Parker2-Jan-03 9:06
protectorNick Parker2-Jan-03 9:06 
QuestionRestricted access to properties? Pin
Nnamdi Onyeyiri2-Jan-03 7:01
Nnamdi Onyeyiri2-Jan-03 7:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.