Welcome to the Xceed Community | Help
Community Search  
More Search Options

StatCell, ResultConverterParameter Problem

Sort Posts: Previous Next
  •  07-20-2009, 8:00 AM Post no. 22717

    StatCell, ResultConverterParameter Problem

    I am trying to set Stat Functions at runtime which is running fine. I have only one problem, When i am passing $ or Euro Symbol it is showing $ but in case of Euro it is showing ?

     

    This is my code which is getting generated at runtime and getting binded to stat row

     

    <xcdg:StatRow>
    <xcdg:StatCell FieldName="Qty" ResultPropertyName="sum_Qty" HorizontalContentAlignment="Right" ResultConverterParameter="#,##,##,##,#0.00" />
    <xcdg:StatCell FieldName="QtyMeasure" ResultPropertyName="sum_QtyMeasure" HorizontalContentAlignment="Right" ResultConverterParameter="#,##,##,##,#0.00" />
    <xcdg:StatCell FieldName="RunningCostAmtBC" ResultPropertyName="sum_RunningCostAmtBC" HorizontalContentAlignment="Right" ResultConverterParameter="$#,##,##,##,#0.00" />
    <xcdg:StatCell FieldName="BalanceCostAmtBC" ResultPropertyName="sum_BalanceCostAmtBC" HorizontalContentAlignment="Right" ResultConverterParameter="$#,##,##,##,#0.00" />
    <xcdg:StatCell FieldName="RunningCostAmtAC" ResultPropertyName="sum_RunningCostAmtAC" HorizontalContentAlignment="Right" ResultConverterParameter="€#,###,###,###.##" />
    <xcdg:StatCell FieldName="CostPerUnit" ResultPropertyName="divide_CostPerUnit" HorizontalContentAlignment="Right" ResultConverterParameter="#,##,##,##,#0.00" />
    <xcdg:StatCell FieldName="CataloguePriceBC" ResultPropertyName="avg_CataloguePriceBC" HorizontalContentAlignment="Right" ResultConverterParameter="$#,##,##,##,#0.00" />
    </xcdg:StatRow>

     

    Here is the image of the output.

    Stat Cell Problem 

    Link of the image : http://img515.imageshack.us/img515/162/statcell.jpg

  •  07-20-2009, 11:52 AM Post no. 22723 in reply to 22717

    Re: StatCell, ResultConverterParameter Problem

    Hi,

    You can force the use of the euro literal by setting ResultConverterParameter="\€#,###,###,###.##"  on your RunningCostAmtAC StatCell.

    Otherwise, please ensure that you are using the same FontFamily in both your StatRow and DataRow.

     

     


    Xceed - Software Developer and Technical Support
  •  07-21-2009, 1:10 AM Post no. 22729 in reply to 22723

    Re: StatCell, ResultConverterParameter Problem

    I have alter it like this :

    <xcdg:StatCell FieldName="RunningCostAmtAC" ResultPropertyName="sum_RunningCostAmtAC" HorizontalContentAlignment="Right" ResultConverterParameter="\€#,###,###,###.##" />

     

    but still the problem remains. It is still showing ? instead of Euro sign. Font family is same i have only assigned font weight property in statrow.

  •  07-21-2009, 2:45 AM Post no. 22731 in reply to 22729

    Re: StatCell, ResultConverterParameter Problem

    This is the another thing i have tried and it is giving me another error:

    Error : Name cannot begin with the '\' character, hexadecimal value 0x5C. Line 1, position 2214.

    <xcdg:StatRow>
    <xcdg:StatRow.Resources>
    <xcdg:StatResultConverter x:Key="statResultConverter"/><app:MaskNumberConverter x:Key="maskConverter" />
    </xcdg:StatRow.Resources>
    <xcdg:StatCell FieldName="Qty"> 
        <xcdg:StatCell.ContentTemplate> 
            <StackPanel Orientation="Horizontal">   
                <TextBlock Text="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:DataGridControl.StatContext).sum_Qty, Converter={StaticResource maskConverter}, ConverterParameter="\#,##,##,##,#0.00"}" Margin="4,0,0,0" /> 
            </StackPanel> 
        </xcdg:StatCell.ContentTemplate>
    </xcdg:StatCell >
    <xcdg:StatCell FieldName="QtyMeasure"> 
        <xcdg:StatCell.ContentTemplate> 
            <StackPanel Orientation="Horizontal">   
                <TextBlock Text="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:DataGridControl.StatContext).sum_QtyMeasure, Converter={StaticResource maskConverter}, ConverterParameter="\#,##,##,##,#0.00"}" Margin="4,0,0,0" /> 
            </StackPanel> 
        </xcdg:StatCell.ContentTemplate>
    </xcdg:StatCell >
    <xcdg:StatCell FieldName="RunningCostAmtBC"> 
        <xcdg:StatCell.ContentTemplate> 
            <StackPanel Orientation="Horizontal">   
                <TextBlock Text="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:DataGridControl.StatContext).sum_RunningCostAmtBC, Converter={StaticResource maskConverter}, ConverterParameter="$#,##,##,##,#0.00"}" Margin="4,0,0,0" /> 
            </StackPanel> 
        </xcdg:StatCell.ContentTemplate>
    </xcdg:StatCell >
    <xcdg:StatCell FieldName="BalanceCostAmtBC"> 
        <xcdg:StatCell.ContentTemplate> 
            <StackPanel Orientation="Horizontal">   
                <TextBlock Text="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:DataGridControl.StatContext).sum_BalanceCostAmtBC, Converter={StaticResource maskConverter}, ConverterParameter="$#,##,##,##,#0.00"}" Margin="4,0,0,0" /> 
            </StackPanel> 
        </xcdg:StatCell.ContentTemplate>
    </xcdg:StatCell >
    <xcdg:StatCell FieldName="RunningCostAmtAC"> 
        <xcdg:StatCell.ContentTemplate> 
            <StackPanel Orientation="Horizontal">   
                <TextBlock Text="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:DataGridControl.StatContext).sum_RunningCostAmtAC, Converter={StaticResource maskConverter}, ConverterParameter="\€#,###,###,###.##"}" Margin="4,0,0,0" /> 
            </StackPanel> 
        </xcdg:StatCell.ContentTemplate>
    </xcdg:StatCell >
    <xcdg:StatCell FieldName="CostPerUnit"> 
        <xcdg:StatCell.ContentTemplate> 
            <StackPanel Orientation="Horizontal">   
                <TextBlock Text="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:DataGridControl.StatContext).divide_CostPerUnit, Converter={StaticResource maskConverter}, ConverterParameter="\#,##,##,##,#0.00"}" Margin="4,0,0,0" /> 
            </StackPanel> 
        </xcdg:StatCell.ContentTemplate>
    </xcdg:StatCell >
    <xcdg:StatCell FieldName="CataloguePriceBC"> 
        <xcdg:StatCell.ContentTemplate> 
            <StackPanel Orientation="Horizontal">   
                <TextBlock Text="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:DataGridControl.StatContext).avg_CataloguePriceBC, Converter={StaticResource maskConverter}, ConverterParameter="$#,##,##,##,#0.00"}" Margin="4,0,0,0" /> 
            </StackPanel> 
        </xcdg:StatCell.ContentTemplate>
    </xcdg:StatCell >
    </xcdg:StatRow>

     

     

    maskConverter is the converter which i am using to convert the data of DataRow. It is working properly as you can see euro sign in DataRows.

  •  07-21-2009, 12:27 PM Post no. 22760 in reply to 22731

    Re: StatCell, ResultConverterParameter Problem

    There are at least 2 things wrong with the provided XAML:

    1- The ContentTemplate property requires a DataTemplate. It will not accept any other element type.

    2- You can't use double quotes (") in in the ConverterParameter. Use a single quote (') instead.

     


    Senior Technical Writer
    - Xceed Software

    In three words I can sum up everything I've learned about life: it goes on.
  •  07-22-2009, 1:28 AM Post no. 22787 in reply to 22760

    Re: StatCell, ResultConverterParameter Problem

    I have modified the code accordingly. but result is the same...

     

    <xcdg:StatCell FieldName="RunningCostAmtAC"> 
        <xcdg:StatCell.ContentTemplate> 
            <DataTemplate> 
                <StackPanel Orientation="Horizontal">   
                    <TextBlock Text="{Binding RelativeSource={RelativeSource Self}, Path=(xcdg:DataGridControl.StatContext).sum_RunningCostAmtAC, Converter={StaticResource statResultConverter}, ConverterParameter='€#,###,###,###.##'}" Margin="4,0,0,0" /> 
                </StackPanel> 
            </DataTemplate> 
        </xcdg:StatCell.ContentTemplate>
    </xcdg:StatCell >

  •  07-22-2009, 8:47 AM Post no. 22794 in reply to 22787

    Re: StatCell, ResultConverterParameter Problem

    What is the error in the output window?
    Senior Technical Writer
    - Xceed Software

    In three words I can sum up everything I've learned about life: it goes on.
  •  07-22-2009, 9:03 AM Post no. 22796 in reply to 22794

    Re: StatCell, ResultConverterParameter Problem

    There is only one error that too for Alternaterowcolor

     System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='HotsoftControls.HotsoftGrid', AncestorLevel='1''. BindingExpression:Path=AlternateRowColor; DataItem=null; target element is 'SolidColorBrush' (HashCode=48034301); target property is 'Color' (type 'Color')
     

  •  07-22-2009, 1:36 PM Post no. 22811 in reply to 22796

    Re: StatCell, ResultConverterParameter Problem

    This is a binding error that is most likely not related to the grid; however, if you provide me with the binding that is failing, I will try and help you get up and running.
    Senior Technical Writer
    - Xceed Software

    In three words I can sum up everything I've learned about life: it goes on.
  •  10-16-2009, 4:50 AM Post no. 24551 in reply to 22811

    Re: StatCell, ResultConverterParameter Problem

    anyone? i m still getting this error :(
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.