Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1280
Format string
posted

Hello,

I am using XamGrid in infragistics 2014.1 to present some integers.

For one column I want to format the integer to be shown with 3 digits. So if integer is 4 then it should be shown as 004

and if 44 then shown as 044.

I have tried with FormatString="{}{0:000}" but it doesn't work

Below is a sample code:

    <ig:XamGrid x:Name="XdtgSearchResults" HorizontalAlignment="Stretch"   VerticalAlignment="Top" AutoGenerateColumns="False"   Margin="0,10,10,0" >
                    <ig:XamGrid.SelectionSettings>
                        <ig:SelectionSettings CellClickAction="SelectRow" RowSelection="Single"/>
                    </ig:XamGrid.SelectionSettings>
                    <ig:XamGrid.Columns>
                        <ig:TextColumn Key="ProductType.ProductTypeCode" HeaderText="PTCode" />
                        <ig:TextColumn Key="ProductCode" HeaderText="PCode" FormatString="{}{0:000}" />
                        <ig:TextColumn Key="SerialNumber" HeaderText="Serial number" />
                    </ig:XamGrid.Columns>
                </ig:XamGrid>

Parents Reply Children
No Data