Duration appear in floating-point types

Hi

I am using ejs-gantt chart in asp.net core.

when i select enddate then duration appear in floating point type.

Please check bellow attached file and please provide solution.



Attachment: Duration_Issue_a5ce5994.zip

1 Reply

MS Monisha Sivanthilingam Syncfusion Team September 8, 2021 06:16 AM UTC

Hi Himmat, 
 
Greetings from Syncfusion support. 
 
We can make use of the edit params to restrict the decimals in the duration column to zero. The following code snippets demonstrate the solution. 
 
Index.cshtml 
 
<e-gantt-column field="Duration" edit=editParams editType="numericedit" valueAccessor="durationFormat"></e-gantt-column> 
 
 
 
@{ 
    var editParams = new { @params = new { format="###" } }; 
    Object durationFormat = "durationFormat"; 
} 
 
 
 
<script> 
    function durationFormat(field, data, column) { 
        return data[field]; 
    } 
</script> 
 
 
We have prepared a sample for your reference and also modified the file you shared. Please find them from the below links. 
 
 
Please contact us if you require any further assistance. 
 
Regards, 
Monisha. 


Loader.
Up arrow icon