I use DevExpress 22. I add an EditorRow to the VerticalGrid. In EditorRow properties for RowEdit selected LookUpEdit from In-place Editor repository. LookUpEdit contains a list from the database with color names. when I select a color name from the list, the EditorRow is painted in that color. but, when I select a color from the list, it is not applied immediately, only when I remove the focus from the EditorRow.
I use EditValueChanged to handle selecting value from a list:
private void Ilue_zprstatus_EditValueChanged(object sender, EventArgs e)
{
LookUpEdit ilue = sender as LookUpEdit;
if (ilue.EditValue.ToString() == "Green")
{
zpr_status.AppearanceCell.BackColor = Color.FromArgb(0x99, 0xFF, 0x99);
}
if (ilue.EditValue.ToString() == "Yellow")
{
zpr_status.AppearanceCell.BackColor = Color.FromArgb(0xFF, 0xFF, 0x99);
}
if (ilue.EditValue.ToString() == "White")
{
zpr_status.AppearanceCell.BackColor = Color.FromArgb(0xFF, 0xFF, 0xFF);
}
}
the function works, but the color does not change immediately. Questions:
- How to refresh the
EditorRowstate immediately after selecting a value from the list? - How to get in
EditorRowthe value ofDisplayMemberfromLookUpEditinstead ofValueMember?
You should handle the lookup repository item's
EditValueChangedevent. See the following code sample: