Modify ColumnEdit data source and columnedit Source

Source: Internet
Author: User

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 ();}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.