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

Grey out some cells

Hi,

Please refer to the attached picture. Is it possible to grey out the marked section? This means to have a "room id"(in that example is AMARANDEI Cornel) and a starting date (in that example is 18th of May 2017).

Thanks,
Cornel.

Attachment: GreyOut_f0cddccf.zip

7 Replies

KK Karthigeyan Krishnamurthi Syncfusion Team March 22, 2017 07:21 AM UTC

Hi Cornel,   
 
Thank you for contacting Syncfusion support.       
     
We can format the cell using cell template option, kindly visit the below links to know more about the feature. We have prepared the sample to customize the particular resource cell color which can be viewed from the below link.     
     
Kindly refer the below code example used in the sample.   
    
<Code> 
workCellsTemplateId: "#workTemplate" 
 
<script id="workTemplate" type="text/x-jsrender"> 
        {{if  resource.classname == 'e-parentnode' && view == 'month' && resource.text == "ROOM2" && (date.getDate() == 5 ||date.getDate() == 6||date.getDate() == 7||date.getDate() == 8||date.getDate() == 9)}} 
        <div style='background-color:#c8c8c8;height:100%'></div> 
        {{/if}} 
        {{if view == 'month' && resource.groupId == 2 && (date.getDate() == 5 ||date.getDate() == 6||date.getDate() == 7||date.getDate() == 8||date.getDate() == 9)}} 
        <div style='background-color:#c8c8c8;height:100%'></div> 
        {{/if}} 
    </script> 
</Code> 
 
Regards, 
Karthigeyan 



CA Cornel Amarandei March 22, 2017 09:59 AM UTC

Hi Karthigeyan,

Thanks for your information. It worked.

But can you please help me to take the information about the roomIds and the dates from the server? I need to make an ajax call but I don't know where to do this.

Regards,
Cornel.


KK Karthigeyan Krishnamurthi Syncfusion Team March 23, 2017 10:34 AM UTC

Hi Cornel,   
   
Thanks for your update.   
   
By default, resource and date information can be retrieved in work cell template section and therefore it is not necessary to use Ajax call to retrieve those information’s from server. Please visit the below sample link where resource and date information’s are retrieved in work cell template section.   
  
Kindly share more information regarding the usage of the Ajax call to serve you better.   
  
Regards,   
Karthigeyan  



CA Cornel Amarandei March 23, 2017 11:57 AM UTC

Hi Karthigeyan,

Thanks for your information.

In the sample link the information regarding the resources and dates are hardcoded (for example resource.text == 'Party Hall-A' && date.getDay() == 5). I have to take these information from the server, this is why I need to use an Ajax call.

Regards,
Cornel. 


KK Karthigeyan Krishnamurthi Syncfusion Team March 24, 2017 12:25 PM UTC

Hi Cornel,    
 
Thanks for your update. 
 
We regret to inform you know that it not possible to use ajax post with in the template section. 
 
Regards, 
Karthigeyan 



CA Cornel Amarandei March 24, 2017 12:34 PM UTC

Hi Karthigeyan,

Thanks for your information.

Regards,
Cornel.


KK Karthigeyan Krishnamurthi Syncfusion Team March 27, 2017 04:41 AM UTC

Hi Cornel,     
  
Thanks for your update.  
  
Please let us know if you need further assistance. 
  
Regards,  
Karthigeyan  


Loader.
Up arrow icon