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

Changing the date to European format and using QueryCellInfoEventArgs

Thread ID:

Created:

Updated:

Platform:

Replies:

149808 Dec 10,2019 10:45 AM UTC Dec 16,2019 01:21 PM UTC Blazor 5
loading
Tags: Grid
Junaid
Asked On December 10, 2019 10:45 AM UTC

Good day,
I am trying to update the date format of a column to the European format. I have followed directions given here:https://www.syncfusion.com/forums/147089/european-date-format
Code:

Version:17.3.26
Mind you, I am also usingQueryCellInfoHandleron this column.
public void QueryCellInfoHandler(QueryCellInfoEventArgs args)
{
if (args.Data.EndDate != null)
{
var diff = args.Data.EndDate.Value.Subtract(DateTime.Now);
var weeks = (float)diff.Days / 7;
if (args.Column.Field == "EndDate")
{
if (weeks > 2 && weeks <= 4)
{
args.Cell.SetAttribute("style", "background-color:#ffe680;text-align:center;");
}
else if (weeks <= 2)
{
args.Cell.SetAttribute("style", "background-color:#ffb3b3;text-align:center;");
}
}
}
}
Unfortunately, I met with these errors:

Also, the styles inQueryCellInfoHandleralso don't apply.

Regards.
Junaid

Renjith Singh Rajendran [Syncfusion]
Replied On December 11, 2019 10:12 AM UTC

Hi Junaid, 

Thanks for contacting Syncfusion support. 

We could see that you are using “CustomFormat” to change the Date format to European and also bind the “QueryCellInfo” event to Grid. 

We would like to inform you that, this is an already known issue and we have logged a defect report for the same. Thank you for taking the time to report this issue “Script error thrown when bind ‘QueryCellInfo’ event to a ‘CustomFormat’ enabled 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 Volume 4, 2019 release.  

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.  

Please get back to us if you need further assistance. 

Regards, 
Renjith Singh Rajendran. 


Junaid
Replied On December 11, 2019 11:47 AM UTC

Good day,

How can I change the color of Date cell, based on a condition, with using the custom format on the column?

Regards.
Junaid

Vignesh Natarajan [Syncfusion]
Replied On December 12, 2019 03:03 PM UTC

Hi Junaid, 

With our current architecture, this requirement is only possible by using the QueryCellInfo event handler. But as we are currently facing issues when using QueryCellInfo along with CustomFormat. We have already logged an improvement for this and this has been fixed internally. 

In our upcoming Volume 4, 2019 release which is expected to be rolled out on or before December 17, 2019, we have deprecated the CustomFormat property and the customizing of European format(or other formats) can be done with the Format property itself. 

Until then we appreciate your patience. 

Regards, 
Vignesh Natarajan. 


Junaid
Replied On December 13, 2019 04:31 AM UTC

Ok. Thanks for you reply. Waiting for your new release.

Regards.
Junaid

Renjith Singh Rajendran [Syncfusion]
Replied On December 16, 2019 01:21 PM UTC

Hi Junaid, 

Thanks for your update. 

Please use the below link to track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries.   

Regards, 
Renjith Singh Rajendran. 


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