November 2nd, 2012, 08:48 AM
how to load the data from datagridview into windows forms accordingly
i want that when i click on any record the date of that record will be loaded in forms above
help me please
i am using CellMouseClick event but in the form it show System.Windows.Forms.DataGridViewSelectedRowCollection instead of showing data
i am using this function
private void Customers_view_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e)
ContactLastName.Text = Customers_view.SelectedRows.ToString();
plz see image here
November 2nd, 2012, 12:53 PM
Re: how to load the data from datagridview into windows forms accordingly
I have not used the DataGridViewSelectedRowCollection, but here is an idea of the tasks you need to perform:
1. Select one DataGridViewRow from the DataGridViewSelectedRowCollection. From clicking one cell this would most likely be the first item in the collection.
2. Select one Cell from the DataGridViewRow. You want to use the column index of the column containing the date you stored.
3. Then you can get the ToString() of that cell.
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!