RobertoCarlos Melgar

RobertoCarlos Melgar

  • 1.5k
  • 159
  • 9.3k

Using of datagridviewcomboboxcolumn c#

Jul 4 2020 4:00 PM
Hello good afternoon.
I have a problem with a DataGridViewComboBoxColumn that I have added to my datagriview, it already has data that I bring from the database.
When I select an item and when passing to the next cell, the value that it had, for example, I select Sales instead of leaving Sales in the cell, it changes to its ID. This happens when I move to the next cell.
Please what should I change or what would be my mistake.
please help me solve my problem thank you very much.
 
this is the code with which I load the data
  1. private void CargarGrupo()  
  2.         {  

  3.             GrupoId.DataSource = tblGrupoComprasGasto.ListaGrupoComprasEgresos();  
  4.             GrupoId.ValueMember = "Id";  
  5.             GrupoId.DisplayMember = "NombreGrupo";  
  6.               
  7.         }  

 Thank you very much for your collaboration
 
R.M. 

Answers (1)