private void OnQueryPopup(object sender, CancelEventArgs e) { PalletLocation pl = new PalletLocation(); LookUpEdit lke = (LookUpEdit)gridDetailView.ActiveEditor; int itemID = Convert.ToInt32(gridDetailView.GetFocusedDataRow()["ItemID"]); lke.Properties.DataSource = PalletLocation.GetAllFreeFor(itemID); }