c# - get repositoryItemGridLookupEdit parent's currentrow processed -
Text after "div class =" itemprop = "text">
I have a GridView and a RepositoryItemGridLookUpEdit in that GridView I want to show a CustomDisplayText
in RepositoryItemGridLookUpEdit < Code> private zeros rgluePerson_CustomDisplayText (object sender, DevExpress.XtraEditors.Controls.CustomDisplayTextEventArgs e) {var person = rgluePerson.GetRowByKeyValue (e.Value) person; Var name = person.Name; Var alias = person Name; E. Display text = name + "," + surname; }}
The problem is that the person's name (in the main GridView) depends on another cell in the same row, and I do not know how to get the current GridView line The action is being taken (the current line is not working because I need a row processed at the moment) ...... I can not use a gridview event because it will change the cell value, but I Change Text Value Ta said. Does anybody know how to do that?
Text after "div class =" itemprop = "text">
You can not get the line being processed by CustomDisplayText
event because There are no such fields or properties in which the existing row exists. You can only use this event for the focused line
Private zeros rgluePerson_CustomDisplayText (Object Sender, CustomDisplayTextEventArgs e) { (If this is GridLookUpEdit (this is)): For this, check if you have this type of GridLookUpEdit
Will happen ; Var anotherCellValue = gridView1.GetFocusedRowCellValue ("Other CellFieldName"); // Your code here Display text = your display text; }
You can not use the event only for focused rows:
Private Zero GridView1_CustomColumnDisplayText (Object Sender, CustomColumnDisplayTextEventArgs e) {if (e .Column.ColumnEdit! = RgluePerson) Return; Var anotherCellValue = gridView1.GetListSourceRowCellValue (e.ListSourceRowIndex, "Other CellFieldName"); // Your code here Display text = your display text; }
Comments
Post a Comment