I have a Gridview and a RepositoryItemGridLookUpEdit in that GridView I want to show a CustomDisplayText in the RepositoryItemGridLookUpEdit
private void rgluePerson_CustomDisplayText(object sender, DevExpress.XtraEditors.Controls.CustomDisplayTextEventArgs e)
{
var person = rgluePerson.GetRowByKeyValue(e.Value) as Person;
var name = person.Name;
var surname = person.Surname;
e.DisplayText = name + ", " + surname;
}
}
The problem is that the person name depends of another cell in the same row (in the main Gridview), and i don't know how to get the current's Gridview row being processed (current row doesn't work since i need the row being processed in the moment)...... i can't use a gridView event cuz it will change the cell value, but i want to change the Text value. Does anyone knows how to do that?
You cannot get the row being processed by the
CustomDisplayText
event because there are no such fields or properties that contains current row. You can only use this event for focused row. For this your must check if sender is type ofGridLookUpEdit
:For not focused rows you can use only
ColumnView.CustomColumnDisplayText
event: