If I understand you correctly, you're talking about using a lookup editor. In our library, there are three editors, providing this functionality - LookUpEdit, GridLookUpEdit and SearchLookUpEdit. I believe a usual LookUpEdit provides more than enough functionality for your needs.
So, you should assign the LookUpEdit as a column's editor and set up its properties. You should fill the DataSource, ValueMember and DisplayMember properties in order to enable the LookUpEdit proper functioning. Please refer to the LookUpEdit Class help topic for additional information and code samples.
Thank you for your response. To achieve the desired result, you should use the ImageComboBox editor instead. Just create a corresponding RepositoryItem at the GridControl level and populate it with necessary items. For example:
- Item1.Value = "M", Item1.Description = "Male";
- Item2.Value = "F", Item2.Description = "Female".
After that, assign this RepositoryItem to the Column's ColumnEdit property.
Attached is an example that demonstrates this approach in action. We look forward to your feedback once you have had the opportunity to try our solution.
Is your intention to post an answer to your own question?
- If so, then proceed.
- If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
- If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.