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

Dynamically bind GridViewCombobox Column

1 Answer 87 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Kaustubh Wadi
Top achievements
Rank 1
Kaustubh Wadi asked on 09 Apr 2010, 11:58 AM
Hi all,
I am using rad grid view. In that gridview I have one gridview combo box column. I want to bind that column with data which is I am retrieving using web service. How can I do that?
Please Help.

-Kaustubh

1 Answer, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 14 Apr 2010, 04:15 PM
Hello Kaustubh Wadi,

You can achieve this using the following code snippets:

 - In code behind get the data from your service and when it is retrieved set it as Items source of the column:
((GridViewComboBoxColumn)this.grdContent.Columns["Value"]).ItemsSource = GetDataFromYourService();

 - define the binding to the selected value and path in the XAML:
<telerikGrid:GridViewComboBoxColumn DataMemberBinding="{Binding Value}" SelectedValueMemberPath="DisplayValue" DisplayMemberPath="" ></telerikGrid:GridViewComboBoxColumn>

Additional information about ComboBoxColumn can be found here.


Kind regards,
Tsvyatko
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Kaustubh Wadi
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Share this question
or