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

Format Column

Thread ID:

Created:

Updated:

Platform:

Replies:

149598 Dec 2,2019 08:23 PM UTC Dec 20,2019 10:22 AM UTC Blazor 2
loading
Tags: Grid
paul stanley
Asked On December 2, 2019 08:23 PM UTC

I noticed that if I wanted a  DateTime column  (as an example) Wed 01-Jan-2020 20:15 usually I would expect to write:
        <GridColumn
                Field=@nameof(Job.bookingTime) HeaderText="BT" Format="ddd dd-MMM HH:mm"
                Type="ColumnType.Date" TextAlign="TextAlign.Left" Width="30">
          </GridColumn>
However, the column is displayed 01 01-Jan-2020 20:15, The "ddd" does not appear to be working.

Vignesh Natarajan [Syncfusion]
Replied On December 3, 2019 09:28 AM UTC

Hi Paul, 

Greetings from Syncfusion support.  

Query: “However, the column is displayed 01 01-Jan-2020 20:15, The "ddd" does not appear to be working. 

We are able to reproduce the reported issue at our end while preparing a sample as per your code example and we have confirmed it is bug. Thank you for taking the time to report this issue “Some C# date formats are not applied properly to Grid” and helping us improve our product. At Syncfusion, we are committed to fixing all validated defects (subject to technological feasibility and Product Development Life Cycle ) and including the defect fix in our upcoming release (2019 Volume 4 -Beta) which is expected to be rolled out in the mid of December 2019 . 
 
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this feedback. 
 
   
Till then, we suggest you to achieve your requirement using Column Template feature of EjsGrid. Refer the below code example. 

<EjsGrid ID="Grid" ModelType="@Model" DataSource="@GridData" AllowPaging="true"> 
    <GridColumns> 
         . . . . . . . . . 
        <GridColumn Field=@nameof(OrdersDetails.OrderDate) HeaderText="Order Date" Type="ColumnType.Date" Width="160"> 
            <Template> 
                @{ 
                    var employee = (context as OrdersDetails); 
                   <span>@employee.OrderDate.ToString("ddd, dd-MMM HH:mm")</span>               } 
            </Template> 
        </GridColumn> 
        <GridColumn Field=@nameof(OrdersDetails.HireDate) HeaderText="Hire Date" Type="ColumnType.Date" Width="160"> 
            <Template> 
                @{ 
                    var employee = (context as OrdersDetails); 
                    <span>@employee.OrderDate.ToString("ddd, dd-MMM HH:mm")</span> 
                } 
            </Template> 
        </GridColumn> 
        <GridColumn Field=@nameof(OrdersDetails.ShipCountry) HeaderText="Ship Country" Width="150"></GridColumn> 
    </GridColumns> 
</EjsGrid> 

Refer our UG documentation for your reference 


Please get back to us if you have further queries. 

Regards, 
Vignesh Natarajan. 


Vignesh Natarajan [Syncfusion]
Replied On December 20, 2019 10:22 AM UTC

Hi Paul,   
  
We are glad to inform that our latest Nuget package (17.4.0.39) has been successfully rolled out. In this release, we have some major changes in our components to improve its performance and also we have migrated our Components to .Net Core 3.1. Hence there are some breaking changed in our components.  
  
Please find the latest Nuget package from below and also find the release notes regarding the fixes we have included in this release.   
  
  
  
  
Also ensure that you have referred the latest version script and css as below   
  
   <link rel='nofollow' href="https://cdn.syncfusion.com/ej2/17.4.39/material.css" rel="stylesheet" />  
  
  
NOTE: In this release we have included the fix for the issue “Some C# date formats are not applied properly to Grid”. 
  
Refer our UG documentation for upgrading the application to our latest version  
  
  
Please get back to us if you have further queries.  
  
Regards,  
Vignesh Natarajan.  


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.

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