Modify ColumnEdit data source and columnedit Source
Application scenarios
After selecting a record from ColumnEdit (such as SearchLookUpEdit), the data source of ColumnEdit does not show this record. As follows:
Before selection
After a record is selected, the previous record is no longer displayed.
This is SearchLookUpEdit, so there will be additional processing, also applies to LookUpEdit
// Do not display the drop-down button or prohibit drop-down replaceLueStaff. buttons. clear (); replaceLueStaff. showDropDown = DevExpress. xtraEditors. controls. showDropDown. never; replaceLueStaff. click + = new EventHandler (replaceLueStaff_Click); void replaceLueStaff_Click (object sender, EventArgs e) {// obtain the selected ColumnEdit SearchLookUpEdit lue = sender as SearchLookUpEdit; // implement the not in filter using linq // gvActor. dataSource is the current gridview, m_dtStaffAll is the control data source var sele CtedIds = (DataView) (gvActor. dataSource )). ofType <DataRowView> (). select (x => x ["STAFF_ID"]. toString (); var query = from p in m_dtStaffAll.AsEnumerable () where! (From x in selectedIds select x ). contains (p ["STAFF_ID"]. toString () select p; lue. properties. dataSource = query. asDataView (); lue. showPopup ();}