Changing the date to European format and using QueryCellInfoEventArgs
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
SIGN IN To post a reply.
5 Replies
RS
Renjith Singh Rajendran
Syncfusion Team
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.
Feedback Link : https://www.syncfusion.com/feedback/10635/script-error-thrown-when-bind-querycellinfo-event-to-a-customformat-enabled-grid
Please get back to us if you need further assistance.
Regards,
Renjith Singh Rajendran.
JU
Junaid
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
VN
Vignesh Natarajan
Syncfusion Team
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.
JU
Junaid
December 13, 2019 04:31 AM UTC
Ok. Thanks for you reply. Waiting for your new release.
Regards.
Junaid
RS
Renjith Singh Rajendran
Syncfusion Team
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.
Feedback Link : https://www.syncfusion.com/feedback/10635/script-error-thrown-when-bind-querycellinfo-event-to-a-customformat-enabled-grid
Regards,
Renjith Singh Rajendran.
SIGN IN To post a reply.
- 5 Replies
- 3 Participants
-
JU Junaid
- Dec 10, 2019 10:45 AM UTC
- Dec 16, 2019 01:21 PM UTC