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. Image for the cookie policy date

Custom Validation and Column Format

How do I do custom column validation.  Also how would I format a datetime column like "MM/dd/yyyy hh:mm"?

Thanks,
Mike

2 Replies

RS Renjith Singh Rajendran Syncfusion Team September 30, 2019 09:12 PM

Hi Michael, 

Thanks for contacting Syncfusion support. 

Query 1 : How do I do custom column validation. 
Currently, we don’t have support for “Custom Validation in Grid”. We have already logged this as a feature task and added to our feature request list. We are always trying to make our products better and feature requests like yours are a key part of our product growth efforts. We have added this feature request to our database.  
  
At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision and technological feasibility. We have planned to implement this feature in our subsequent Nuget release which is expected to be roll out on any of our upcoming releases.  
 
You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.  

Query 2 : how would I format a datetime column like "MM/dd/yyyy hh:mm"? 
We can achieve this requirement by using the “Custom format feature of Grid”. But currently, we don’t have support to apply custom format for Syncfusion Blazor Grid. But we have already logged this as a feature and added to our feature request list. We are always trying to make our products better and feature requests like yours are a key part of our product growth efforts. We have added this feature request to our database.  
  
At the planning stage for every release cycle, we review all open features and identify features for implementation based on specific parameters including product vision, technological feasibility, and customer interest. We have planned to implement this feature in our subsequent Nuget release which is expected to be roll out on or before first week of October 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 link.  

Until then we appreciate your patience. Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran. 



RS Renjith Singh Rajendran Syncfusion Team October 11, 2019 01:38 AM

Hi Michael,  

Query 2 : how would I format a datetime column like "MM/dd/yyyy hh:mm"? 
We are glad to inform you that our latest Nuget package (17.3.0.17) has been successfully rolled out. In this release, we have included the feature “Custom Format Support for Blazor Grid”. Please find the latest Nuget package from the link below, 

 
 
Also ensure to refer the latest version script and css in your application.  
 
     
    <link rel='nofollow' href="https://cdn.syncfusion.com/ej2/17.3.17/fabric.css" rel="stylesheet" /> 
 
 
Please use the below code to apply custom format for Grid columns. 
 
 
<GridColumn Field=@nameof(Order.OrderDate) HeaderText="Order Date" CustomFormat="@(new { type ="date", format="dd.MM.yyyy" })" Type="ColumnType.Date"> 
 
 
You can use custom format string to format the date values. Some of the custom formats and the formatted date values are given in the below table. 
 
Format 
Formatted value 
{ type=”date”, format=”dd/MM/yyyy”} 
04/07/1996 
{ type=”date”, format=”dd.MM.yyyy” } 
04.07.1996 
{ type=”date”, skeleton=”short” } 
7/4/96 
{ type=”dateTime”, format= ”dd/MM/yyyy hh:mm a” } 
04/07/1996 12:00 AM 
{ type= “dateTime”, format= “MM/dd/yyyy hh:mm:ss a” } 
07/04/1996 12:00:00 AM 
 
 
Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran. 



Loader.
Live Chat Icon For mobile
Up arrow icon