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

Gannt resources and units

Hi

When enabling resources, in its dialog there is a dropdown for the resource and a unit in %. I can save the resources as comma separated values, but how do you get and safe its unit value?

And also is it possible to hide the unit value on the resources dialog?

THX
Armand

3 Replies

JD Jayakumar Duraisamy Syncfusion Team April 25, 2017 05:08 PM UTC

Hi Armand, 
 
Please find the response below. 
 
Query 1: I can save the resources as comma separated values, but how do you get and safe its unit value? 
Solution: When we are adding resources from dropdown, it will be save as 100%-unit value as default. We can add/remove resources in cell editing actions, suppose we want to change the unit value, it can be change in the dialog resource tab,  
 
Query 2:  is it possible to hide the unit value on the resources dialog? 
Solution:  We don’t have any in-build API/methods to hide resource unit column at run time but we can achieve it by following work around. 
By using “actionBegin” client side event, we can hide the unit column using “hideColumn” public method.  
Please refer following code snippet, 
$("#gantt").ejGantt({ 
//… 
actionBegin:"actionBegin", 
}) 
function actionBegin(args) { 
                if (args.requestType == "OpenAddDialog") { 
 
                    var resObj = $(args.element).find("#treegrid" + this._id + "resourceAdd").ejTreeGrid("instance"); 
                    // pass column header Text 
                    resObj.hideColumn("Unit") 
 
                } 
                else if (args.requestType == "openEditDialog") { 
                    var resObj = $(args.element).find("#treegrid" + this._id + "resourceEdit").ejTreeGrid("instance"); 
                    //pass column header Text 
                    resObj.hideColumn("Unit") 
                } 
            } 
 
We have also prepared a sample for your reference, please find the following sample link, 
  
Regards, 
Jayakumar D 



AD Armand De Lange April 25, 2017 05:59 PM UTC

Hi

Thanks for the reply.

Regarding the units, I want to save the unit values to a sql database, so that they can persist and be loaded on the next display on the Gantt control. And I can't figure it out, I also do not see it on the object in javascript by using var ganttObj = $("#Gantt").data("ejGantt");

So I need to save it to database, and again let it display and be used in the gantt control on binding.

THX
Armand


JD Jayakumar Duraisamy Syncfusion Team April 26, 2017 12:20 PM UTC

Hi Armand, 
 
At present, there is no support for resource unit value allocation for each record. Hence, we have logged a Feature report “Support for resources units of each record in Gantt”. We are considered this feature as high priority and it will be implemented in any of our upcoming main release. 
 
Please let us know if you require further assistance on this. 
Regards, 
Jayakumar D 


Loader.
Up arrow icon