combobox clear when lost focus

3 Replies 1 reply marked as answer

SJ Sathiyathanam Jeyakumar Syncfusion Team August 15, 2022 03:17 PM UTC

Hi Sergio Ayala,


We suspect you don’t define the
“ValueMember ” and “DisplayMember” property for your GridComboBoxColumn. Can you please check this in your application and let us know?


Is any possibility to share the code snippets or a simple sample to us it will help us to investigate further and provide the better solution as much earliest.


Regards

Sathiyathanam



SA Sergio Ayala August 15, 2022 09:58 PM UTC

ok, sorry:

Grid settings (load form):

Captura de pantalla 2022-08-15 235809.jpg

Model Datasource (giros):

Captura de pantalla 2022-08-15 235304.jpg

Captura de pantalla 2022-08-15 235347.jpg



VS Vijayarasan Sivanandham Syncfusion Team August 16, 2022 05:42 PM UTC

Hi Sergio Ayala,

We would like to let you know that the cell value of GridComboBoxColumn will be updated only while changing the underlying property (MappingName) that is bound to the column. The reported problem occurs because the MappingName bound property is not in the underlying model. Please refer to the below screenshot.


Text

Description automatically generated

We suspect that you have bound the DataSource for your GridComboBoxColumn as "CboGirisModel". You have used the ParticipantModel as the underlying model or business object of your DataGrid bound DataSource. And you have used the "Descripcion" property as a MappingName in GridComboBoxColumn. But the description property is not present in the underlying model, i.e., the ParticipantModel. That only the selected data is not displayed after lost focus in GridComboBoxColumn.


You can resolve the reported problem by adding the Descripcion property to the ParticipantModel. Please refer to the below code snippet,

public class ParticipantModel

{

 

       public string? Descripcion { get; set; }       

 

}


Please let us know if you have any concerns in this.


Regards,
Vijayarasan S

If this post is helpful, please consider Accepting it as the solution so that other members can locate it more quickly.


Marked as answer
Loader.
Up arrow icon