Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Dec 02, 2009 00:23
open dhtmlx forum
Header Dropdown

Hi I want to implement multiple checkbox select and the values should come from the database. The rows are getting the values from the database but those values are not appearing into the combobox. I am sending you my code.

This is my sample.html page
<link rel='STYLESHEET' type='text/css' href='../dhtmlxGrid/codebase/dhtmlxgrid.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_srnd.js'></script>    

<script src='../dhtmlxDataProcessor/codebase/dhtmlxdataprocessor.js'></script>    



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

    <script src='../dhtmlxConnector_PHP/codebase/connector.js'></script>
<div id="gridbox" style="width:1000px; height:902px;"></div>



<script>

    mygrid = new dhtmlXGridObject('gridbox');

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

    mygrid.setHeader("ID,Name,shotID,shotstatus,taskid,taskref,userID,taskStatus,startdate,enddate,alloted mandays,task priority,next sub,actual mandays");

    mygrid.setInitWidths("100,*")

    mygrid.setColTypes("ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed");

    mygrid.setSkin("modern")

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

    mygrid.setColSorting("connector,connector,connector")

    

    mygrid.init();

    mygrid.enableSmartRendering(true);

    mygrid.loadXML("connector.php");

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

    dp.init(mygrid);

</script>

And this is my connector.php page.

<?php

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



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

    mysql_select_db("sampledb");



    $grid = new GridConnector($res);

    $grid->dynamic_loading(100);

    $grid->render_table("products","nm","code,num_val,shotid,shotstatus,taskid,taskref,tasknote,userid,taskstatus,start_date,end_date,alloted_mandays,task_priority,next_sub,actual_manday");

?>



Please reply me as soon as possible.
Answer posted by dhxSupport on Dec 02, 2009 01:43
>>Hi I want to implement multiple checkbox select and the values should come from the databas
If you want implement checkboxes at the grid one of your columns should has "ch" type
>>The rows are getting the values from the database but those values are not appearing into the combobox. I am sending you my code.
All you columns has #connector_text_filter filters. To implement select boxes at the header you should use #connector_select_filter. http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxconnector:filtering