Hello,
I'm facing a lot of troubles with the datagrid... I need to format the content my columns based on a picker, whenever it's currency I must switch to C2, otherwise it will be N0 format.
My XAML
Margin="8,0"
Text="{Binding Path=BindingContext.MonthHeaders[1], Source={x:Reference rootView}}"
XAlign="End"
YAlign="Center" />
Margin="8,0"
Text="{Binding D02, StringFormat='{}{0:N0}'}"
XAlign="End"
YAlign="Center">
Binding="{Binding Path=BindingContext.IsCurrency, Source={x:Reference rootView}}"
TargetType="Label"
Value="True">
Binding="{Binding D02, Converter={StaticResource doubleIsZeroOrLessConverter}}"
TargetType="Label"
Value="True">
I have 30 columns like that with D1...D30 MappingName. The problem is that when I change to C the first time, every time I switch back to IsCurrency = false the data is not changing anymore. Datagrid always showme the same data over and over but if I switch to IsCurrency = true it shows the correct amount.
Edit: I switched the triggers order and now the N0 format is working fine but the C2 not. Seems that it only respect the last format option.
2 Replies
Oldest first
Hello,
I'm facing a lot of troubles with the datagrid... I need to format the content my columns based on a picker, whenever it's currency I must switch to C2, otherwise it will be N0 format.
My XAML
Margin="8,0"
Text="{Binding Path=BindingContext.MonthHeaders[1], Source={x:Reference rootView}}"
XAlign="End"
YAlign="Center" />
Margin="8,0"
Text="{Binding D02, StringFormat='{}{0:N0}'}"
XAlign="End"
YAlign="Center">
Binding="{Binding Path=BindingContext.IsCurrency, Source={x:Reference rootView}}"
TargetType="Label"
Value="True">
Binding="{Binding D02, Converter={StaticResource doubleIsZeroOrLessConverter}}"
TargetType="Label"
Value="True">
I have 30 columns like that with D1...D30 MappingName. The problem is that when I change to C the first time, every time I switch back to IsCurrency = false the data is not changing anymore. Datagrid always showme the same data over and over but if I switch to IsCurrency = true it shows the correct amount.
Edit: I switched the triggers order and now the N0 format is working fine but the C2 not. Seems that it only respect the last format option.
Please find attached my XAML
Attachment: xaml_b347d634.zip
SS
Sivaraman Sivagurunathan
Syncfusion Team
February 27, 2018 12:27 PM UTC
Hi Juan,
Thanks for using syncfusion support.
We have checked your query. Currently we do not provide the support for runtime changes in GridColumn.Format . we will consider this in future.
Regards,
Sivaraman
Need More Help?
Get personalized assistance from our support team.
Contact Support
2 Replies
2 Participants
Want to subscribe?
Created by
JC
Juan Carlos Gonzalez Salazar
Platform
Control
Created On Feb 26, 2018 05:20 PM UTC
Last Activity On Feb 27, 2018 12:27 PM UTC
Need More Help?
Get personalized assistance from our support team.
Contact Support
7/13/2026 02:31:59 PM
Sun, 15 December 2024 03:30:00 UTC
Sun, 15 December 2024 03:30:00 AM
Wed, 16 Feb 2022 04:59:00 UTC