This is a migrated thread and some comments may be shown as answers.

Material resources?

6 Answers 68 Views
Gantt
This is a migrated thread and some comments may be shown as answers.
Al
Top achievements
Rank 1
Iron
Iron
Iron
Al asked on 18 Feb 2021, 01:51 PM

I was wondering whether the resources are intended only for people/time based resources or if it is ok to use for material/quantity type resources eg. cement, wire etc.

It looks like I can customize the unit number format to show kg, metres

6 Answers, 1 is accepted

Sort by
0
Accepted
Ivan Danchev
Telerik team
answered on 22 Feb 2021, 01:15 PM

Hello,

You can use the resources.dataFormatField option, to specify how the resource will appear. Here's an example: https://dojo.telerik.com/EQArOliR

Regards,
Ivan Danchev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Al
Top achievements
Rank 1
Iron
Iron
Iron
answered on 22 Feb 2021, 01:38 PM
Yes, that is what I was looking at to format the units. I just wanted to confirm that there is nothing in the gantt that makes the resources aimed specifically at 'people' resources.
0
Al
Top achievements
Rank 1
Iron
Iron
Iron
answered on 25 Mar 2021, 12:40 PM

I was revisiting this, as per your suggestion this string works fine:

    unit: "#:value # metres",

but it rounds the value and outputs eg."1 metres" when the value entered into the gantt edit screen is 1.3 - what would the format string need to be to display "1.3 metres"?

ps I can find absolutely no documentation on the "#" and ":value" formatting options...

 

0
Ivan Danchev
Telerik team
answered on 29 Mar 2021, 09:34 AM

Hi,

You can set the format like this to display "1.3 meters":

{ id: 1, name: "Wire", color: "#32cd32", unit: "0.0" + "meters"}

Or "0.00", if you want to show two digits after the decimal point.

Regards,
Ivan Danchev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

0
Al
Top achievements
Rank 1
Iron
Iron
Iron
answered on 29 Mar 2021, 11:59 AM

That works, thank Ivan!

 

Is there any way to change the default editor for some resources to be only whole numbers? Currently the buitlin number editor increments/decrements 0.01 at a time

0
Ivan Danchev
Telerik team
answered on 31 Mar 2021, 09:45 AM

Al,

Currently, the Gantt's API does not provision a configuration option or method for controlling this behavior. Consider logging this as a feature request in our Feedback Portal: https://feedback.telerik.com/kendo-jquery-ui

Regards,
Ivan Danchev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Gantt
Asked by
Al
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Ivan Danchev
Telerik team
Al
Top achievements
Rank 1
Iron
Iron
Iron
Share this question
or