We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Different behavior for two DateTime? columns

Thread ID:





129455 Mar 20,2017 07:08 AM UTC Mar 23,2017 03:40 PM UTC WPF 5
Tags: SfDataGrid
Asked On March 20, 2017 07:08 AM UTC

Hi, I have a sfDataGrid with two columns of date type. These columns are DateTime? and this is the XAML:

                <Syncfusion:GridDateTimeColumn MappingName="Scadenza"
                                               TextAlignment="Center" />
                <Syncfusion:GridDateTimeColumn MappingName="DataPagamento"
                                               HeaderText="Data pagamento"
                                               TextAlignment="Center" />

Why the different behavior?
I have also tried to set the "CustomPattern", but without success.


Attachment: screenshot_2680643e.rar

Muthukumar Kalyanasundaram [Syncfusion]
Replied On March 21, 2017 05:51 AM UTC

Hi Fabio, 
Thank you for contacting Syncfusion support. 
We have checked your attached screenshot. In that, you have set the custom pattern for DateTimeColumn(Datapagamento). We are unable to reproduce the reported “DateTime column pattern are differed” issue in our end. For your reference, we have attached the sample in the below location.  
If you want to customize the DateTimeColumn, you can refer the below documentation link, 
If you are still facing the issue, could you please revert by modifying the attached sample based on your application along with the replication procedure? This would be helpful for us to provide an appropriate solution.  
Please let us know if you have any query. 
Muthukumar K 

Replied On March 21, 2017 06:06 PM UTC

I attached your example.
I added a gridtemplatecolumn e UseDrawing="Default"

Attachment: SfGrid_sampleDemo_69a3e91f.rar

Muthukumar Kalyanasundaram [Syncfusion]
Replied On March 22, 2017 09:04 AM UTC

Hi Fabio, 
Thanks for the update. 
We have analyzed your provided sample. In that, you have used the same MappingName for more than one column. SfDataGrid process column based on mapping and we should not set same MappingName for more than one property. When you enable drawing, text drawn based on GridTemplateColumn mapping name. So we suggest you to use different mapping name for GridColumn.  
If you want to performance data operations (sorting, grouping) based on same mapping name for two columns, then your requirement can be achieve by setting same ValueBinding and different Mapping.  
Code Snippet: 
<syncfusion:GridTemplateColumn HeaderText="Test" MappingName="DevDate1" ValueBinding="{Binding Path=DevDate}" UseBindingValue="True"> 
                    <Style TargetType="Image"> 
                        <Setter Property="Source" Value="AG00090_.GIF"/> 
                            <DataTrigger Binding="{Binding DevDate}" Value="{x:Null}"> 
                                <Setter Property="Source" Value="AG00092_.GIF"/> 
Please let us know if you have any query. 
Muthukumar K 

Replied On March 22, 2017 05:25 PM UTC



Muthukumar Kalyanasundaram [Syncfusion]
Replied On March 23, 2017 03:40 PM UTC

Hi Fabio, 
You are welcome. Please let us know if you need any other assistance. 
Muthukumar K 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon