Unresolved cell data binding after Q1-2012 release upgrade

3 posts, 0 answers
  1. Paolo
    Paolo avatar
    13 posts
    Member since:
    Mar 2012

    Posted 07 Mar 2012 Link to this post

    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. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 08 Mar 2012 Link to this post

    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 >>
  3. Paolo
    Paolo avatar
    13 posts
    Member since:
    Mar 2012

    Posted 08 Mar 2012 Link to this post

    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
Back to Top