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

GridViewDataColumn.DataFormatString no longer works on nested bindings

1 Answer 143 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Geoff Hardy
Top achievements
Rank 1
Geoff Hardy asked on 16 Mar 2010, 04:56 PM
I recently upgraded to the 2010 Q1 release of the RadControls for Silverlight. Something that has broken is this release is the use of DataFormatString on GridViewDataColumn when binding to nested properties. For example, the following used to work:

<TelerikGrid:GridViewDataColumn DataMemberBinding="{Binding Details.LastUpdate}" Header="Last Update" DataFormatString="{}{0:g}" IsReadOnly="True" Width="145" IsFilterable="False" IsSortable="False" TextAlignment="Left"/>

This no longer shows the column in the correct format. For now I can work around this problem by creating an extra property on the ViewModel that I am binding to, and this will show the date in the correct format. For example:

<TelerikGrid:GridViewDataColumn DataMemberBinding="{Binding LastUpdate}" Header="Last Update" DataFormatString="{}{0:g}" IsReadOnly="True" Width="145" IsFilterable="False" IsSortable="False" TextAlignment="Left"/>

However, this is not ideal since I have to keep this property in sync with the underlying property. 



1 Answer, 1 is accepted

Sort by
0
Accepted
Stefan Dobrev
Telerik team
answered on 17 Mar 2010, 11:41 AM
Hi Geoff,

This issues has already been reported to us and we have implemented a fix in our code base. It will be available in the next latest internal build. Please, excuse us for the inconvenience caused by this bug.

Best wishes,
Stefan Dobrev
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
Geoff Hardy
Top achievements
Rank 1
Answers by
Stefan Dobrev
Telerik team
Share this question
or