private void gridView3_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) { DataRow dr = gridView3.GetFocusedDataRow(); if (dr != null) { int facilityID = Convert.ToInt32(dr["ID"]); gridFacilityBreakdown.DataSource = Institution.GetResupplyPerUnit(facilityID); txtSelectedFacility.Text = dr["Name"].ToString(); } }