This question is locked. New answers and comments are not allowed.
I am building a radgridview that has a date column and two currency columns (code below). I need my date column to show in the user's default culture (specified via the html object "culture" param), but the currency columns need to be in whatever currency the user is currently working with. I have the language code for the currency (e.g. "fr-CA") in a property of my ViewModel, but I can't figure out how to use that to change the language of just those two columns without messing with the culture of the date column. I can't use it as a converterparameter or a converterculture for the binding because it itself is a binding.
It needs to work for both viewing and for editting, so if the currency culture uses a comma as the decimal separator, you type commas into the edit box.
I'd appreciate any help I can get!
--Christina
It needs to work for both viewing and for editting, so if the currency culture uses a comma as the decimal separator, you type commas into the edit box.
I'd appreciate any help I can get!
--Christina
<
telerik:RadGridView
x:Name
=
"grdFiles"
SelectionMode
=
"Extended"
ItemsSource
=
"{Binding JournalItemView}"
AutoGenerateColumns
=
"false"
SelectionUnit
=
"FullRow"
CanUserSelect
=
"False"
IsSynchronizedWithCurrentItem
=
"false"
ShowColumnFooters
=
"False"
RowEditEnded
=
"grdFiles_RowEditEnded"
AddingNewDataItem
=
"grdFiles_AddingNewDataItem"
RowLoaded
=
"grdFiles_RowLoaded"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewSelectColumn
UniqueName
=
"SelectColumn"
/>
<
telerik:GridViewDataColumn
UniqueName
=
"Date"
DataMemberBinding
=
"{Binding DateValue}"
DataFormatString
=
"{}{0:d}"
>
<
telerik:GridViewDataColumn.Header
>
<
TextBlock
>
<
Run
Text
=
"{Binding Labeller, Source={StaticResource ViewModel}, ConverterParameter=Date, Converter={StaticResource LabelStringConverter}, FallbackValue=Date}"
/>
<
Run
Text
=
"*"
Foreground
=
"Red"
/>
</
TextBlock
>
</
telerik:GridViewDataColumn.Header
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
UniqueName
=
"Debit"
DataMemberBinding
=
"{Binding Debit}"
DataFormatString
=
"{}{0:c}"
Width
=
"120"
TextAlignment
=
"Right"
HeaderTextAlignment
=
"Right"
Header
=
"{Binding Labeller, Source={StaticResource ViewModel}, ConverterParameter=Debit, Converter={StaticResource LabelStringConverter}, FallbackValue=Debit}"
/>
<
telerik:GridViewDataColumn
UniqueName
=
"Credit"
Width
=
"120"
TextAlignment
=
"Right"
HeaderTextAlignment
=
"Right"
DataMemberBinding
=
"{Binding Credit}"
DataFormatString
=
"{}{0:c}"
Header
=
"{Binding Labeller, Source={StaticResource ViewModel}, ConverterParameter=Credit, Converter={StaticResource LabelStringConverter}, FallbackValue=Credit}"
>
</
telerik:GridViewDataColumn
>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>