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

Data binding GridViewComboBoxColumn

1 Answer 142 Views
GridView
This is a migrated thread and some comments may be shown as answers.
ronald
Top achievements
Rank 1
ronald asked on 31 Jan 2011, 01:01 PM
Hi,

how do i bind the foreignkey in GridViewComboBoxColumn which item source from DataTable.

this is what I have so far but it does not display the value but the combox was correctly populated
<telerik:GridViewComboBoxColumn DataMemberBinding="{Binding PaymentTypeID}" Header="Payment Type"
DisplayMemberPath="PaymentTypeID"
SelectedValueMemberPath="{Binding PaymentTypeID}"
ItemsSource="{Binding PaymentType}">
</telerik:GridViewComboBoxColumn>
                                           
                                   
public DataView PaymentType
        {
            get
            {
                if (paymentType == null)
                {
                    paymentType = populateDataTable();
                }
                return paymentType.DefaultView;
            }
        }

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 31 Jan 2011, 02:48 PM
Hi ronald,

You should not set the SelectedValueMemberPath with a Binding:

SelectedValueMemberPath="PaymentTypeID"
 

Regards,
Maya
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
GridView
Asked by
ronald
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or