private void gridViewMissingOrders_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e) { // disable all the buttons. DataRow dataRow = gridViewMissingOrders.GetFocusedDataRow(); if (dataRow != null) { btnExport.Enabled = btnPrint.Enabled = btnReprint.Enabled = false; // now just show the details of the order IssueDoc issueDoc = new IssueDoc(); issueDoc.LoadMissingByOrderID(Convert.ToInt32(dataRow["ID"])); gridTransactions.DataSource = issueDoc.DefaultView; } }