private void BindOutstandingOrders() { BLL.Order or = new BLL.Order(); this.tabControlOrderDetail.SelectedTabPage = this.tabGeneral; bool clearSelection = (gridOrder.DataSource == null); // Bind the orders that have not been Approved. if (lkMode.EditValue != null) { gridOrder.DataSource = or.GetAllOutstandingOrders(CurrentContext.UserId, int.Parse(lkMode.EditValue.ToString())); } if (clearSelection) { gridViewOrder.OptionsSelection.EnableAppearanceFocusedRow = false; } gridViewOrder.ExpandAllGroups(); }