Change field name

Hello!

I try to make your Gantt component works with my own database, but I have a problem with the mapping. I can’t find in your doc the way to modify the fields name.

Can you send me an example please?

Thank you.

Hello,
currently most of properties can not renamed on the client, e.g. names as ‘id’, ‘start_date’, ‘duration’, etc. are mandatory.
So mapping should be done on the server, for example check this article (gantt in .NET MVC, c#)
dhtmlx.com/blog/using-dhtmlx … p-net-mvc/
see the ‘Step 2’ and ‘Step 3’, where the mapping is done

If you use dhtmlxConnector, it also supports aliases for column names
docs.dhtmlx.com/connector__php__ … odbcolumns

Thanks for the answer and the links.

I got an another question. I used the aliases for column names. It works with parent field or sort order but aliases don’t work with start_date, text, duration. Is it the normal behaviour or I’m doing something wrong ?

Thanks.

Hi,
can you please show the of connector initialization and scheme of your table?

Hi,

I show you my php file :

<?php
	include ('codebase/connector/gantt_connector.php');
	
	$res=mysql_connect("localhost","root","");
	mysql_select_db("my_database");
	
	$gantt = new JSONGanttConnector($res);
	$gantt->render_links("my_table_links","id_attach","record_id(source),record_id_linked(target),quantity(type)");
	$gantt->render_table("my_table_tasks","id_record","attribute_226(start_date),attribute_227(duration),attibute_228(text),attribute_229(parent),type_id(type)");

?>

Please try to use the update connector file (attached) instead of the original one
gantt_connector_o.zip (3.02 KB)

Hello,

Thanks you, everything work just find now.

Have a good day.