Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7194727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:25:55+00:00 2026-05-28T20:25:55+00:00

I am using the LookUpEdit control. I bound two columns, a primary key (GUID)

  • 0

I am using the LookUpEdit control. I bound two columns, a primary key (GUID) and a human readable string. I only want people to see the human readable string, but I want to preserve the relationship between the string value and it’s primary key value.

I can’t seem to hide the primary key from displaying on dropdown. I’ve tried the DevExpress forum and their proposed solution does not work for me. So I tried hooking into the ListChanged event. That is not working either.

private void DataBind()
{
    messageTypeCbB.ListChanged += new ListChangedEventHandler(messageTypeCbB_ListChanged);
    messageTypeCbB.Properties.DataSource = viewModel.SomeNoteTypes.ToArray();
    //another attempt at hiding the columns.  This fails too.  
    //messageTypeCbB.Properties.ForceInitialize();
    //messageTypeCbB.Properties.PopulateColumns();
    //messageTypeCbB.Properties.Columns[0].Visible = false;
    messageTypeCbB.Properties.DisplayMember = "NodeType";
    messageTypeCbB.Properties.ValueMember = "SomeNoteType_ID";

    fromTxt.Text = viewModel.From;
    dateTimeDd.DateTime = viewModel.Date;
}

void messageTypeCbB_ListChanged(object sender, ListChangedEventArgs e)
{            
    //For whatever reason this won't hide the column
    (sender as DevExpress.XtraEditors.LookUpEdit).Properties.Columns[0].Visible = false;
}

How can I hide the surrogate key? (Hide ValueMember display only DisplayMember)

DevExpress v11.1.6

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:25:56+00:00Added an answer on May 28, 2026 at 8:25 pm

    I was calling DataBind() from my Form constructor. I moved the call into the Form Load event and it solved the problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using DevExpress LookUpEdit control in my application. I want to set the datasource
Using C#, I want to format a decimal to only display two decimal places
I am using a DevExpress LookUpEdit control. My database has two tables that control
I'm using the DevExpress LookupEdit control in my C# application. How do I remove
Hai, Am using DevExpress LookupEdit in C#.NET application.I want to clear all items in
Using online interfaces to a version control system is a nice way to have
I am using DevExpress.XtraEditors.LookUpEdit to display the information about the classes available. Currently it
Using linq2sql I'm trying to take the string in txtOilChange and update the oilChange
Using WPF/PRISM I want to log my messages through ILoggerFacade to my GUI (A
Using the HTML5 File API I can get the Binary String representation of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.