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

Unresolved cell data binding after Q1-2012 release upgrade

2 Answers 50 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Paolo
Top achievements
Rank 1
Paolo asked on 07 Mar 2012, 05:56 PM
Hi hackers.

I recently upgraded to Q1-2012 libraries and all data columns in my grid seem to be empty, except for those having a custom CellTemplate defined.
Here's a code snippet: the first data column (Order ID) is correcty shown, all other columns are empty.

<telerik:RadGridView> 
                    x:Name="gridOrders"
                    Style="{StaticResource LOGridViewReadOnlyStyle}"
                    SelectionChanged="GridOrdersSelectionChanged"
                    HorizontalAlignment="Left" VerticalAlignment="Stretch"
                    BorderThickness="1,1,1,0"
                    FrozenColumnCount="5"
                    SelectionMode="Extended">
 
    <telerik:RadGridView.Columns>                  
 
        <!-- Order ID as Link -->
        <telerik:GridViewDataColumn Header="Order ID"
                                        DataMemberBinding="{Binding TaskId}"
                                        HeaderCellStyle="{StaticResource GridViewHeaderCellStyle}" Width="70"  >
            <telerik:GridViewDataColumn.CellTemplate>
                <DataTemplate>
                    <Button Content="{Binding TaskId}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Left"
                            Margin="0,0,0,0"
                            Style="{StaticResource HyperlinkButtonStyle}"
                            Foreground="{StaticResource HyperlinkButtonForegroundBrush}" />
                </DataTemplate>
            </telerik:GridViewDataColumn.CellTemplate>
        </telerik:GridViewDataColumn>
        <telerik:GridViewDataColumn Header="External ID1" DataMemberBinding="{Binding ExternalID1}" IsGroupable="False" IsFilterable="False" HeaderCellStyle="{StaticResource GridViewHeaderCellStyle}" Width="100"  />
        <telerik:GridViewDataColumn Header="External ID2" DataMemberBinding="{Binding ExternalID2}" IsGroupable="False" IsFilterable="False" HeaderCellStyle="{StaticResource GridViewHeaderCellStyle}" Width="100"  />
        <telerik:GridViewDataColumn Header="Internal Key" DataMemberBinding="{Binding DispKey}" IsGroupable="False" IsFilterable="False" HeaderCellStyle="{StaticResource GridViewHeaderCellStyle}" Width="100"  />
        <telerik:GridViewDataColumn Header="Duration" DataMemberBinding="{Binding Duration, Converter={StaticResource DurationHourMinConverter}}" IsGroupable="False" IsFilterable="False" HeaderCellStyle="{StaticResource GridViewHeaderCellStyle}" Width="60" TextAlignment="Right" />
    </telerik:RadGridView.Columns>
</telerik:RadGridView>

What about breaking changes from previous releases?
Any suggestion to solve this issue?

Thanks in advance.

Paolo

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 08 Mar 2012, 07:45 AM
Hi,

We don't have any breaking changes related to columns/cells. What was your previous version? Can you send us an example where we can check working vs. non-working version of your scenario? 

Regards,
Vlad
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Paolo
Top achievements
Rank 1
answered on 08 Mar 2012, 10:53 AM
Hi Vlad,

thanks for your quick answer. My previous libraries version was 2011.2.0712.1040.
Finally, I found and solved the bug in my application's code and now GridView is working again: I'm filling an ObservableCollection from DB and assign it to the grid as ItemsSource... so, if I perform the assignment before retrieving data from the query, the grid is loaded with an empty source and cell binding is not resolved. Now, I moved the assignment after query response and everything works fine.

Thanks again.
Paolo
Tags
GridView
Asked by
Paolo
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Paolo
Top achievements
Rank 1
Share this question
or