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

EJ:Schedule - QueryCellInfo Args to Access Appointment


Is there a way to directly access an appointment's properties when performing the JavaScript function for QueryCellInfo? I can change all appointment elements during the event, but I would like to decide specific formatting for appointments as determined by their properties.

Pseudo-code (DOES NOT WORK!)
function QueryCellInfo(args)
switch (args.requestType)
case "appointment":
if (args.appointment.Subject == "Meeting")
// style appointment

Please and thanks,

1 Reply

SE Sellakumar Syncfusion Team March 13, 2017 12:41 PM UTC

Hi Matt,   
Thanks for contacting Syncfusion support.   
As per your requirement, we suggest you to maintain a custom field in an appointment object. Based on this custom field value, we can customize the element inside QueryCellInfo event. The below code explains to maintain custom fields in object.   
In Appointment Object:   
new SampleData {    
                Id = 1 ,    
                Subject = "Turtle Walk"   
                Description = "Night out with turtles"   
                StartTime = new DateTime(2017, 3, 6, 5, 30, 0),    
                EndTime = new DateTime(2017, 3, 6, 7, 30, 0),    
                AllDay = false   
                Recurrence = false   
                QueryCellType = "Admin"    
In QueryCellInfo Event:   
         <script type="text/javascript">   
        function onQueryCellInfo(args) {   
            if (args.requestType == "appointment") {   
                if (args.appointment.QueryCellType == "Admin") {   
                    args.element.css({ background: "green" });   
                else {   
                    args.element.css({ background: "lightgreen" });   
We had prepared a sample based on your requirement, which can be download from following location.   
Kindly check the above sample and revert us with further details, if we have misunderstood your requirement.   
Sellakumar K  

Live Chat Icon For mobile
Up arrow icon