GroupBy Problem when populate data from database


i have problem when grouping task with database. i try this demo and It Works !. but when i populate data from database tasks can’t grouping

This is my code


Tasks grouping html, body{ height:100%; padding:0px; margin:0px; overflow: hidden;}
		font-weight: bold;
	.gantt_grid div,
	.gantt_data_area div{

		opacity: 0.4;

gantt.config.xml_date = "%Y-%m-%d %H:%i"; gantt.init("my_gantt"); gantt.config.columns = [ {name: "text", label: "Task name", width: "*", tree: true}, {name: "start_date", label: "Start time", align: "center", width: "*"}, {name: "duration", label: "Duration", align: "center", width: 46}, {name:"priority", label:"Priority", align: "center", width:55, template:function(obj){ return byId(gantt.serverList("priority"), obj.priority) }}, {name: "add", label: "", width: 44} ];
    gantt.config.order_branch = true;
    gantt.config.grid_resize = true;

            gantt.locale.labels.section_priority = "Priority";

    function byId(list, id) {
        for (var i = 0; i < list.length; i++) {
            if (list[i].key == id)
                return list[i].label || "";
        return "";

    gantt.templates.grid_row_class =
            gantt.templates.task_row_class = function (start, end, task) {
                if (task.$virtual)
                    return "summary-row"
    gantt.templates.task_class = function (start, end, task) {
        if (task.$virtual)
            return "summary-bar";

    gantt.config.lightbox.sections = [
        {name: "description", height: 38, map_to: "text", type: "textarea", focus: true},
        {name: "employee", map_to: "Employee_IdEmployee", type: "select", options: gantt.serverList("employee")},
        {name: "tasktype", map_to: "TaskType_Id", type: "select", options: gantt.serverList("tasktype")},
        {name: "proyek", map_to: "Proyek_IdProyek", type: "select", options: gantt.serverList("proyek")},
        {name: "time", height: 72, type: "duration", map_to: "auto"}

    gantt.locale.labels.section_employee = "Employee Name";
    gantt.locale.labels.section_tasktype = "Task Type Name";
    gantt.locale.labels.section_proyek = "Proyek Name";

    function showGroups(listname) {
        if (listname) {
                groups: gantt.serverList(listname),
                relation_property: listname,
                group_id: "key",
                group_text: "label"
        } else {


    var dp = new dataProcessor("data.php");


diplaying like this

thank you


As I see, there is no section with ‘Priority’ options at gantt.config.lightbox.sections.
Perhaps, event data also hasn’t this property. That is why it’s not possible to sort tasks by Priority. Please, check it.