Datagrid ???
C#
2
Posts
2
Posters
0
Views
1
Watching
-
I load my data into Datagrid, I'd like open a new form(contain the data about this row) by clicking on each row of the Datagrid . How can i do that ???
Use HiteTestInfo class which contains information about a part of the System.Windows.Forms.DataGrid at a specified coordinate. See MSDN for more details. Eg:
System.Drawing.Point pt = this.dgUnAllocatedOrders.PointToClient(Cursor.Position); DataGrid.HitTestInfo hti = this.dgUnAllocatedOrders.HitTest(pt); if(hti.Type == DataGrid.HitTestType.RowHeader) { Yourform alloc=new Yourform(); alloc.ShowDialog(); }
Sreejith Nair [ My Articles ]