Changing TaskNode color for each Node basing on value from datasource

Hi

Is is possible to customize tasknodebackground  based on  value readed from for example datatable ?

I have gantt where ItemSource is readed from datatable. Now I want customize it something like that : when value from some column have  value=1 then background color of  node should be green, when value=2 color should  red etc. Something like this :

if (row["status"] == 1 )
{
Node  background color =  green
}

if (row["status"] == 2 )
{
Node background  color =  red
{


I found this answer https://www.syncfusion.com/forums/108386/task-node-color-change-resource-gantt-chart but the attached project failed to compile in vs2017

3 Replies

SG Sridharan Gajendran Syncfusion Team March 29, 2018 09:42 AM UTC

Hi Bartosz, 

Thanks for contacting Syncfusion Support. 

Query 1: How to customize the task node background? 

We have achieved your requirement in the sample level by customizing the task node style. Please find the demo sample from the following location. 

Sample: GanttDemo 

Query 2: How to resolve the compilation failure in forum VS2017 project sample?  

We are unable to reproduce the reported problem on our side. Please provide us more information on error log details which will be helpful to proceed further. 

Regards, 
Sridharan 



BK Bartosz Kaczuba replied to Sridharan Gajendran March 29, 2018 10:04 AM UTC

Hi Bartosz, 

Thanks for contacting Syncfusion Support. 

Query 1: How to customize the task node background? 

We have achieved your requirement in the sample level by customizing the task node style. Please find the demo sample from the following location. 

Sample: GanttDemo 

Query 2: How to resolve the compilation failure in forum VS2017 project sample?  

We are unable to reproduce the reported problem on our side. Please provide us more information on error log details which will be helpful to proceed further. 

Regards, 
Sridharan 


Thanks for answer and demo , very helpfully

Query2 - I forgot use project migration tool. After migration  everything building and working  ok


SG Sridharan Gajendran Syncfusion Team March 30, 2018 03:55 AM UTC

Hi Bartosz, 

Thanks for the update. 

Please let us know if you need any other assistance on this. 

Regards, 
Sridharan 


Loader.
Up arrow icon