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

RadGridView GridViewDataColumn Multiple DataFormatString

4 Answers 26 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
ShinichiKudo
Top achievements
Rank 1
ShinichiKudo asked on 27 Aug 2014, 10:36 AM
Hi All,
I want to multiple  format string for GridViewDataColumn.
I use code:
<telerik:GridViewDataColumn DataMemberBinding="{Binding Fee}" Header="{StaticResource lblFeeTransaction_1}"  DataFormatString="{Binding ModelData.NumberFormat}"/>
It's not working with DataFormatString="{Binding ModelData.NumberFormat}"
I want format string at interface.
Please help me... Thanks you very much!

4 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 27 Aug 2014, 03:04 PM
Hi,


Thank you for contacting us. 

You could take a look at the following forum thread, where similar issue was discussed. 

Hope this helps. 

Regards,
Vanya Pavlova
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
ShinichiKudo
Top achievements
Rank 1
answered on 29 Aug 2014, 02:34 AM
Hi,
I watch  forum thread, but i don't quite understand
can you make an example?
Thanks you!
0
Dimitrina
Telerik team
answered on 02 Sep 2014, 09:04 AM
Hello,

You can bind the DataFormatString. You just need to ensure you pass a valid Source for the Binding.
For example:
<Window.Resources>
    <local:SampleData x:Key="myData"/>
</Window.Resources>
<telerik:GridViewDataColumn DataFormatString="{Binding TimestampFormatString, Source={StaticResource myData}}" DataMemberBinding="{Binding CreationTimestamp}"/>

In the forum thread, my colleague suggested that you use a converted for the Binding and return the correct value for the format you would like to apply. That way you can apply a custom logic to a binding. You can refer to the example in msdn (IValueConverter).

Regards,
Didie
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
ShinichiKudo
Top achievements
Rank 1
answered on 03 Sep 2014, 02:54 AM
it's working very good... Thanks you for all :)
Tags
General Discussions
Asked by
ShinichiKudo
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
ShinichiKudo
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or