<syncfusion:SfDataGrid x:Name="sfgrid" AutoGenerateColumns="False" ShowGroupDropArea="True" ItemsSource="{Binding OrderList}"> <syncfusion:SfDataGrid.Columns> <syncfusion:GridDateTimeColumn MappingName="OrderDate" TextAlignment="Center" Pattern="ShortDate"/> <syncfusion:GridCurrencyColumn MappingName="UnitPrice" TextAlignment="Right" CurrencyGroupSeparator="," CurrencyGroupSizes="3" AllowGrouping="True"/> |
sfgrid.AutoGeneratingColumn += Sfgrid_AutoGeneratingColumn;
private void Sfgrid_AutoGeneratingColumn(object sender, AutoGeneratingColumnArgs e) { if(e.Column is GridCurrencyColumn) { var currencyColumn = e.Column as GridCurrencyColumn; currencyColumn.CurrencyDecimalSeparator = ","; currencyColumn.TextAlignment = TextAlignment.Center; currencyColumn.CurrencyGroupSizes = new Int32Collection() {3, 2}; } |
Please let us know if you require further assistance on this.
Regards,
Antony Raj
<syncfusion:SfDataGrid x:Name="grid" ItemsSource="{Binding OrderInfoCollection}" AllowResizingColumns="True" ColumnSizer="Auto" <syncfusion:GridCurrencyColumn MappingName="Note" HeaderText="Retail Rate" Width="300" TextAlignment="Right" CurrencyGroupSizes="3" CurrencyGroupSeparator="," <syncfusion:GridDateTimeColumn MappingName="Date" TextAlignment="Center" HeaderText="Till" Width="100"
</syncfusion:SfDataGrid.Columns>
</syncfusion:SfDataGrid> |
Sample: http://www.syncfusion.com/downloads/support/forum/123321/ze/Samples-905390982
Please refer the below link to know more GridCurrencyColumn.
Link: http://help.syncfusion.com/wpf/sfdatagrid/column-types#gridcurrencycolumn
Regards,
Srinivasan
Thanks for your replyChanged code as per your suggestion and found Only TextAlignment is not working (every thing is aligned Left)Sample you supplied is working perfectly so I think there is something wrong in my project itself, So can you please tell me where to look for problemThanks in advanceAmit Saraf