Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Dec 03, 2009 01:37
open dhtmlx forum
implemenet chckbox in combobox

Hello,

this is my html file and i want to add checkbox in my combobox[#connector_select_filter) and also if i willcheck hte multiple checkbox thensome events must be fired and with the help of that event result must be shown. i have one more code to show checkbox in combobox but no event fired on the code just for showing the checkbox in conmbobox. and i m not applied that code in my code . please send me the link or code so i will implemnet that code in my project.


<div id="gridbox" width="350px" height="550px" style="background-color:white;overflow:hidden"></div>
<script>
mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath("../common/imgs/");
mygrid.setHeader("Column A, Column B");
mygrid.attachHeader("#connector_select_filter,#connector_select_filter")
mygrid.setInitWidths("100,*")
mygrid.setColTypes("edtxt,ed");
mygrid.setColSorting("connector,connector")
mygrid.enableSmartRendering(true)
mygrid.enableMultiselect(true)
mygrid.init();
mygrid.loadXML("05a_select_filter_connector.php");
var dp = new dataProcessor("05a_select_filter_connector.php");
dp.init(mygrid);
</script>



<?php
require_once("../config.php");
$res=mysql_connect($mysql_server,$mysql_user,$mysql_pass);
mysql_select_db($mysql_db);
require("../../codebase/grid_connector.php");



$grid = new GridConnector($res);
$grid->enable_log("temp.log",true);
$grid->dynamic_loading(100);


$grid->render_table("grid50","item_id","item_nm,item_cd");
?>



i have thhis code for showing combobox with checkbox but no event occur
script>

window.dhx_globalImgPath = "../../codebase/imgs/";

</script>
<link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxcombo.css">
<script src="../../codebase/dhtmlxcommon.js"></script>
<script src="../../codebase/dhtmlxcombo.js"></script>
<script src="../../codebase/ext/dhtmlxcombo_extra.js"></script>


<h3>Image Select</h3>
<div id="combo_zone2" style="width:200px; height:30px;"></div>
<h3>Checkbox Select</h3>
<div id="combo_zone3" style="width:200px; height:30px;"></div>
<script>

var z = new dhtmlXCombo("combo_zone2", "alfa2", 200, 'image');
z.setDefaultImage("../common/images/book.gif");
z.loadXML("../common/data_03_options.xml");
var z = new dhtmlXCombo("combo_zone3", "alfa3", 200, 'checkbox');
z.addOption([[1, 1111], [2, 2222], [3, 3333], [4, 4444], [5, 5555]]);

</script>



please give me some other code so that code i will aplpply in my above code. please reply me as soon as poosible.









Answer posted by Alex (support) on Dec 03, 2009 02:31

Hello,

#connector_select_filter doesn't support checkboxes.

But you can create custom filter in the grid header: http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxgrid:filtering