This is a migrated thread and some comments may be shown as answers.

Radgridview issue

1 Answer 111 Views
Documentation
This is a migrated thread and some comments may be shown as answers.
Karthik
Top achievements
Rank 1
Karthik asked on 20 Jan 2020, 10:33 AM

Hi,

I have three GridViewComboBoxColumn in RadGridView. Each Combobox column has display name and selected value code. When I assign the value, corresponding values are assigning correctly. But when when I fetch the row, Code value is coming as null and code value is displaying in name. I have attached the image.

The following code I have used to bind data to GridViewComboBoxColumn.

 ((GridViewComboBoxColumn)this.dataGrid.Columns["Company_Name"]).ItemsSource = CompanyList;
 ((GridViewComboBoxColumn)this.dataGrid.Columns["Company_Name"]).DisplayMemberPath = "Company_Name";
 ((GridViewComboBoxColumn)this.dataGrid.Columns["Company_Name"]).SelectedValueMemberPath = "Company_Code_Hdn";

1 Answer, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 23 Jan 2020, 09:07 AM

Hello Karthik,

Thank you for the provided pictures. 

Have you setup the DataMemberBinding of the GridViewComboBoxColumn? It specifies which property from the bound object will be related to the SelectedValueMemberPath from the objects in the ItemsSource. 

If the above suggestion does not prove helpful, may I ask you to share a sample project demonstrating your scenario? You can do that in a new support ticket (since project files cannot be added to forum posts). This will allow us to check out the setup and better assist you.

Regards,
Vladimir Stoyanov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Documentation
Asked by
Karthik
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
Share this question
or