J
Jeff Cook
Hi
1. In a DataGrid, I'd like to respond to a click anywhere on the line,
but it seems that the click event only works on the first column (the
"indicator" column).
2. In my click event, I want to get data from the correct row of the
DataSet (XML). This what I've done so far, and I realise that I have
specifically asked for row zero, but I can't see how to specify the
"current" row.
private void grdLandlords_Click(object sender, System.EventArgs e)
{
frmLandlord f = new frmLandlord();
f.Text = "Landlord "
+ (string) ds.Tables["Landlord"].Rows[0]["LandlordCode"]
+ " "
+ (string) ds.Tables["Landlord"].Rows[0]["SortKey"];
f.Show();
} // eventually, I'll pass the LandlordCode and assign f.Text from within
the form - if I can work out how to access my main form DataSet!
TIA
Jeff
1. In a DataGrid, I'd like to respond to a click anywhere on the line,
but it seems that the click event only works on the first column (the
"indicator" column).
2. In my click event, I want to get data from the correct row of the
DataSet (XML). This what I've done so far, and I realise that I have
specifically asked for row zero, but I can't see how to specify the
"current" row.
private void grdLandlords_Click(object sender, System.EventArgs e)
{
frmLandlord f = new frmLandlord();
f.Text = "Landlord "
+ (string) ds.Tables["Landlord"].Rows[0]["LandlordCode"]
+ " "
+ (string) ds.Tables["Landlord"].Rows[0]["SortKey"];
f.Show();
} // eventually, I'll pass the LandlordCode and assign f.Text from within
the form - if I can work out how to access my main form DataSet!
TIA
Jeff