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

Custom Column

Can we add a custom column to the right side of the Gantt chart? (Like Total Cost)



6 Replies

JR John Rajaram Syncfusion Team December 15, 2014 09:30 AM UTC

Hi Hasan,

 

Thank you for using Syncfusion Products.

 

It is possible to add custom column in Gantt control like “Total Cost” as you mentioned, it can be done using “LOAD” client side event. Please refer the following code snippets for more details:

 

Code Snippets:

 

 

<ej:Gantt ID="Gantt" runat="server" ... Load="load">

//...

</ej:Gantt>

 

<script type="text/x-jsrender" id="columnTemplate">

        <div style='height:20px;width:20px;margin:auto; background-repeat:no-repeat;'>{{:#data['Cost']}}</div>

</script>

 

<script type="text/javascript">

        function load(args) {

            var columns = this.getColumns();

            columns.splice(10, 0,

               {

                   field: "Cost",

                   headerText: "Total Cost($)",

                   columnTemplate: true,

                   templateId: "columnTemplate",

                   width: "120px"

               });

        }

</script>

 

 

We have also prepared a sample based on this and you can find the sample under the following attachment.


Please let us know if you require any further assistance on this.

Regards,
John. R


Attachment: ColumnLastP_efaa19ac.zip


HK Hasan Kosten December 15, 2014 10:36 AM UTC

Hello John,

Thank you for the quick response and sample project. But I want to add the column to the right to the chart, after the gantt drawing section. 

The sample adds the column to the left.




HK Hasan Kosten December 16, 2014 01:01 PM UTC

Any updates on this?

Thanks,


JR John Rajaram Syncfusion Team December 16, 2014 01:28 PM UTC

Hi Hasan,

We regret for the inconvenience caused.

We have analysed your reported query. It is not possible to render new custom column to the right side of the Gantt chart. So could you please share more details about your requirements? Whether you need whole TreeGrid part to the right side of the Gantt chart. This would be helpful for us to serve you.

Please let us know if you require further assistance on this.

Regards,
John. R



HK Hasan Kosten December 17, 2014 02:00 AM UTC

Hello John,

I need some of the columns on the left, and some (like Total Cost, Current/Future Spendings) to the right. But unfortunately I couldn't find a way to do so.

Thank you.


JR John Rajaram Syncfusion Team December 17, 2014 11:20 AM UTC

Hi Hasan,


We have created a new incident (133199) on behalf of you related to this forum. We suggest you to follow up the incident for further reference using your direct trac account.

 

Regards,

John R


Loader.
Up arrow icon