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

CellEditTemplate binding

1 Answer 77 Views
GridView
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 28 Sep 2012, 02:08 PM
I'm attempting to bind a RadListBox within a CellEditTemplate but for some reason it isn't working.  I've attempted to bind a RadListBox outwith the GridView and it works fine.
<telerik:GridViewDataColumn Header="Actionees" UniqueName="ACT856">
                    <telerik:GridViewDataColumn.CellEditTemplate>
                        <DataTemplate>
                            <telerik:RadListBox ItemsSource="{Binding Path=Actionees}" DisplayMemberPath="FullName" SelectedValuePath="IdentityId" />
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellEditTemplate>
                </telerik:GridViewDataColumn>

Am I missing something?

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 29 Sep 2012, 10:41 AM
Hi,

The reason why the ListBox is not bound properly would probably be that its ItemsSource cannot be resolved. Please keep in mind that the DataContext for the CellEditTemplate is the bound data item, it is not the DataContext for the GridView.

You should provide a valid Source(using a StaticResource) for the Binding.

Kind regards,
Didie
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

Tags
GridView
Asked by
James
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or