Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Jan 10, 2010 22:39
open dhtmlx forum
show calendar in shrmlxgrid

Hello,

i m using dhtmlxgrid video samples example and i have to add "dhxCalendarA" then it will give me error

incorrect cell type

can u plz tell me how we add the dhxcalendarA in my dhtmlxgrid

below is my code


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

    "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

    <link href='../dhtmlxGrid/codebase/dhtmlxgrid.css' rel='STYLESHEET' type='text/css'>

    <link href='../dhtmlxGrid/codebase/ext/dhtmlxgrid_pgn_bricks.css' rel='STYLESHEET' type='text/css'>

    

    <script src='../dhtmlxGrid/codebase/dhtmlxcommon.js'></script>

    <script src='../dhtmlxGrid/codebase/dhtmlxgrid.js'></script>    

    <script src='../dhtmlxGrid/codebase/dhtmlxgridcell.js'></script>    

    

    

    <script src='../dhtmlxGrid/codebase/ext/dhtmlxgrid_filter.js'></script>    

    <script src='../dhtmlxConnector_php/codebase/connector.js'></script>

</head>



<body>

    

<div id="gridbox" style="width:932px; height:370px;"></div>





<script>

    mygrid = new dhtmlXGridObject('gridbox');

    mygrid.setImagePath('../dhtmlxGrid/codebase/imgs/');

    mygrid.setHeader("Check,Add/Del,ShotID,Shotstatus,TaskID,Taskref,Task-Note,Alloted Mandays,UserID,TaskStatus,StartDate,EndDate,Task Priority,Next-Sub,Last-Sub,Actual Mandays,Supervisor");

    mygrid.setInitWidths("100,*")

        mygrid.setColTypes("ch,ro,ro,ro,ro,ed,ed,txt,ed,ed,ro,dhxCalendar,dhxCalendar,dhxCalendar,ed");

    mygrid.setSkin("modern")

    

    mygrid.attachHeader(" , ,#connector_select_filter,#connector_select_filter,#connector_select_filter,#connector_select_filter, ,#connector_select_filter,#connector_select_filter,#connector_select_filter,#connector_select_filter,#connector_select_filter,#connector_select_filter,#connector_select_filter,#connector_select_filter,#connector_select_filter,#connector_select_filter")

    

    

    mygrid.init();

//    mygrid.enablePaging(true,50,10,"pagingArea",true);

    //mygrid.setPagingSkin("bricks");

    mygrid.loadXML("connector.php");

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

    dp.init(mygrid);

    

</script>

</body>

</html>



<?php

    require_once("../dhtmlxConnector_php/codebase/grid_connector.php");



    $res=mysql_connect("localhost","root","redhat");

    mysql_select_db("kanibrainNew1");



    $grid = new GridConnector($res);

    $grid->dynamic_loading(100);

        //$grid->render_table("proj","projID","projName,projStatus");

            $grid->render_sql("select * from shot,shotTaskArtist where shotTaskArtist.projID=shot.projID and shot.projID='om' and shotTaskArtist.shotID_new=shot.shotID order by shot.shotID asc","shot_task_id","checkEfficiency,overDue,difficulty,shotID_new,shotStatus,taskID,TaskREF,task_note,manDays,userID,taskStatus,startDate,endDate,task_priority,actualMandays,supervisorName");

?>


please reply me as soon as possible


Thanks
Answer posted by Alex (support) on Jan 12, 2010 01:34

Hello,

dhxCalendar type requires that dhtmlxgrid_excell_dhxCalendar.js, dhtmlxcalendar.js, dhtmlxcalendar.css and dhtmlxcalendar_yahoolike.css are also included.

The sample in grid package is dhtmlxGrid/samples/01_cell_types/01_calendar_grid.html, on our website - http://www.dhtmlx.com/docs/products/dhtmlxGrid/samples/01_cell_types/01_calendar_grid.html