Control LookupEdit does not show the display member

0

I can not get a control LookUpEdit to show me the display member .

I have a form with controls textbox and% lookupedit , all linked to a gridcontrol . As I move through the grid, the controls are updated with the values of the grid, but the display member of lookupedit there is no way, it is empty. The grid has a field RepresentanteID of a table of Suppliers and I intend that the lookupedit (Representatives table) show the name of the linked representative. The truth is that when it falls on a provider that has a representative, the lookup is shown in white, but if the provider does not have a representative, the display member shows [vacío] . I think I have it correctly configured, both the lookupedit and the columns of the grid (where I include the field RepresentanteID of the table providers - hidden -).

txtTelefono2.Text = gridView1.GetFocusedRowCellValue("Telefono2").ToString();
....
lookRepresentante.EditValue = lookRepresentante.Properties.GetDisplayValueByKeyValue(gridView1.GetFocusedRowCellValue("RepresentanteID").ToString());

Any ideas? Thank you very much in advance.

    
asked by Caleyero 29.05.2018 в 19:35
source

1 answer

0

I would recommend you use the textedit, since the lookupedit shows a small grid which would be best filled from a datatable, it is better a textedit, it would be as follows textedit.text = gridView1.GetFocusedRowCellValue ("column header") .ToString ()) so every time you click on a row the grid will be filled automatically with the selected field of the row.

    
answered by 02.06.2018 в 05:23