Results 1 to 2 of 2

Thread: [RESOLVED] XAML, Format String

  1. #1
    Hyperactive Member Krokonoster's Avatar
    Join Date
    Jan 10
    Location
    Cape Town
    Posts
    440

    Resolved [RESOLVED] XAML, Format String

    Hi,
    Another n00b question.

    I got a datagrid that bind to a collection, works fine.
    One field in the model is an integer which displays fine.
    It's an amount, but I must not format it as a Currency, just have it start with an "R"

    This works (formatting as an currency) so I know I'm on the right track:
    Code:
    <DataGridTextColumn Header="Arrears Balance" Binding="{Binding ArrearsAccountBalance,StringFormat={}{0:C}}" />
    Figure I just need the right formatting specified in there to leave the number as is, just put an "R" in front of it?


  2. #2
    Hyperactive Member Krokonoster's Avatar
    Join Date
    Jan 10
    Location
    Cape Town
    Posts
    440

    Re: XAML, Format String

    Solved it...simpler than I thought:

    Code:
    <DataGridTextColumn Header="Arrears Balance" Binding="{Binding ArrearsAccountBalance,StringFormat={}{0:R #}}" />


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •