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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Different behavior for two DateTime? columns

Thread ID:

Created:

Updated:

Platform:

Replies:

129455 Mar 20,2017 07:08 AM UTC Mar 23,2017 03:40 PM UTC WPF 5
loading
Tags: SfDataGrid
Fabio
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"
                                               HeaderText="Scadenza"
                                               AllowNullValue="True"
                                               TextAlignment="Center" />
                <Syncfusion:GridDateTimeColumn MappingName="DataPagamento"
                                               HeaderText="Data pagamento"
                                               AllowNullValue="True"
                                               TextAlignment="Center" />


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

Regards

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. 
 
Regards, 
Muthukumar K 


Fabio
Replied On March 21, 2017 06:06 PM UTC

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

Regards
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"> 
    <syncfusion:GridTemplateColumn.CellTemplate> 
        <DataTemplate> 
            <Image> 
                <Image.Style> 
                    <Style TargetType="Image"> 
                        <Setter Property="Source" Value="AG00090_.GIF"/> 
                        <Style.Triggers> 
                            <DataTrigger Binding="{Binding DevDate}" Value="{x:Null}"> 
                                <Setter Property="Source" Value="AG00092_.GIF"/> 
                            </DataTrigger> 
                        </Style.Triggers> 
                    </Style> 
                </Image.Style> 
            </Image> 
        </DataTemplate> 
    </syncfusion:GridTemplateColumn.CellTemplate> 
</syncfusion:GridTemplateColumn> 
 
 
 
Please let us know if you have any query. 
 
Regards, 
Muthukumar K 
 


Fabio
Replied On March 22, 2017 05:25 PM UTC

Thanks.

Regards

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. 
 
Regards, 
Muthukumar K 


CONFIRMATION

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.

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

;