hello, i am working in a dhtmlx grid which is required to bind a dhtmlx combo to a column index
where mygrid.setColTypes(“co”);
now how to load combo with xml data.pls help…
Unfortunately it’s not available to load options for “co” column from a separate xml file.
You may try to use “combo” exCell, which supports the needed feature:
docs.dhtmlx.com/doku.php?id=dhtm … cell_combo
hello ,
when grid.setColTypes("…,combo,…");
is used it is showing error" description:cofigutation ,incorrect cell type combo"
but i got the solution with
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject(“Microsoft.XMLHTTP”);
}
xmlhttp.open(“GET”,"…/writable/xml/pro-hotel-city.xml",false);
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;
x=xmlDoc.getElementsByTagName(“option”);
for (i=0;i<x.length;i++)
{
mygrid.getCombo(3).put(x[i].childNodes[0].nodeValue,x[i].childNodes[0].nodeValue);
}
when grid.setColTypes("…,combo,…");
is used it is showing error" description:cofigutation ,incorrect cell type combo"
Please, make sure that dhtmlxcombo.js, dhtmlxgrid_excell_combo.js are added to the page.
Here is the working example:
dhtmlx.com/docs/products/dht … combo.html
i am using dhtmlxfull pro
Please, provide a sample of your code to reconstruct the issue.
Or open ticket at support.dhtmlx.com and provide a complete demo.
sending the demo pls… chk in grid.aspx .on submit button click the error comes.
form-initDemo.zip (798 KB)
I’m sorry but where is the init of your grid in the provided demo?
this is the complete function with myGrid.init .pls…help
function GridFunction() {
var txtVeh1 = document.getElementsByName(“txtVhecial”);
var txtVeh2 = document.getElementsByName(“txtVehical2”);
var txtDays = document.getElementsByName(“txtDays”);
var txtStartDate = document.getElementsByName(“start_date”);
// alert(txtStartDate[0].value);
var splitDate = txtStartDate[0].value.split("-");
var d2 = new Date(splitDate[0], splitDate[1], splitDate[2])
obj11 = document.getElementsByName("txtVhecial2");
objHotel2 = document.getElementsByName("txtHote2");
if (obj11.length > 0) {
var strVeh2 = "veh-2" + txtVeh2[0].value;
}
mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath('dhtmlx_pro_full/imgs');
var strGetHeaderVal;
strGetHeaderVal = "a,#cspan,#cspan,City,";
if (strVeh2 != null) {
strGetHeaderVal += txtVeh1[0].value + ",#cspan," + strVeh2 + ",#cspan,";
}
else {
strGetHeaderVal += txtVeh1[0].value + ",#cspan,";
}
if (objHotel2.length > 0) {
strGetHeaderVal += "Hotel Option 1,#cspan,#cspan,#cspan,#cspan,Hotel Option 2,#cspan,#cspan,#cspan,#cspan,";
}
else {
strGetHeaderVal += "Hotel Option 1,#cspan,#cspan,#cspan,#cspan,";
}
strGetHeaderVal += "Guide Eleph etc,Train Entr PP ,Airfare";
mygrid.setHeader(strGetHeaderVal);
var strAttachHeader = "Day,Date,Itenery,#rspan,";
// var strsetColType = "ro,ro,ed,ed,";
var strsetColType = "ro,ro,ed,combo,";
var strattachFooter = "Total quantity,#cspan,#cspan,#cspan,";
var strattachFooter2 = "computed,#cspan,#cspan,#cspan,";
var strSecId = 0;
// alert(strAttachHeader);
if (strVeh2 != null) {
noOfVeh = 2;
for (var noCOL = 0; noCOL < 2; noCOL++) {
strAttachHeader += "Transfer,Sight-seeing,";
strsetColType += "ed,ed,";
var getVhId = "vh_" + strSecId;
// alert(getVhId);
strattachFooter += "<div id='vh_" + strSecId + "'>0</div>,";
strattachFooter2 += "<div id='Comvh_" + strSecId + "'>0</div>,";
var strSecId = strSecId + 1;
strattachFooter += "<div id='vh_" + strSecId + "'>0</div>,"
strattachFooter2 += "<div id='Comvh_" + strSecId + "'>0</div>,";
strSecId++;
}
}
else {
var getVhId = "vh_" + strSecId;
// alert(getVhId);
strAttachHeader += "Transfer,Sight-seeing,";
strsetColType += "ed,ed,";
strattachFooter += "<div id='vh_" + strSecId + "'>0</div>,";
strattachFooter2 += "<div id='Comvh_" + strSecId + "'>0</div>,";
var strSecId = strSecId + 1;
strattachFooter += "<div id='vh_" + strSecId + "'>0</div>,"
strattachFooter2 += "<div id='Comvh_" + strSecId + "'>0</div>,";
// strSecId++;
}
var strHotelOption = 0;
if (objHotel2.length > 0) {
for (var noCOL = 0; noCOL < 2; noCOL++) {
strAttachHeader += "Hotel Name,Meal Plan,SGL,DBL,PP Meal,";
strsetColType += "ed,ed,ed,ed,ed,";
for (var nohCOL = 0; nohCOL < 5; nohCOL++) {
strattachFooter += "<div id='ho_" + strHotelOption + "'>0</div>,"
strattachFooter2 += "<div id='Comhotel_" + strHotelOption + "'>0</div>,";
strHotelOption++;
}
}
}
else {
strAttachHeader += "Hotel Name,Meal Plan,SGL,DBL,PP Meal,";
strsetColType += "ed,ed,ed,ed,ed,";
for (var nohCOL = 0; nohCOL < 5; nohCOL++) {
strattachFooter += "<div id='ho_" + strHotelOption + "'>0</div>,"
strattachFooter2 += "<div id='Comhotel_" + strHotelOption + "'>0</div>,";
strHotelOption++;
}
}
strAttachHeader += "#rspan,#rspan,#rspan";
strsetColType += "ed,ed,ed";
for (var i = 0; i < 3; i++) {
strattachFooter += "<div id='constantCal_" + i + "'>0</div>,";
strattachFooter2 += "<div id='ComconstantCal_" + i + "'>0</div>,";
}
strattachFooter += ["text-align:left;"];
strattachFooter2 += ["text-align:left;"];
mygrid.attachHeader(strAttachHeader);
mygrid.setColTypes(strsetColType);
// alert(strAttachHeader);
mygrid.attachFooter(strattachFooter);
mygrid.attachFooter(strattachFooter2);
combo = mygrid.getColumnCombo(3);
combo.enableFilteingMode(true);
combo.loadXML(“pro-hotel-city.xml”);
mygrid.init();
mygrid.setMathRound(2);
mygrid.enableMathEditing(true);
var date = new Date(splitDate[0], splitDate[1], splitDate[2]);
var dd = date.getDate();
for (var i = 0; i < txtDays[0].value; i++) {
date.setDate(dd + i);
mygrid.addRow(i, [i, date.toDateString(), "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"], i);
}
myDataProcessor = new dataProcessor("../griddatahandler.ashx?hdn_key=update-enquiry");
// //lock feed url;
myDataProcessor.setTransactionMode("POST", true);
// //set mode as send-all-by-post;
myDataProcessor.setUpdateMode("off");
// //disable auto-update;
[b] myDataProcessor.init(mygrid);[/b]
mygrid.attachEvent("onEditCell", calculateFooterValues);
mygrid.setSkin("dhx_skyblue");
}
Such error (“Error type: configuration, description:incorrect cell type combo”) may occur if the required js files are not added to the page. In your “dhtmlx.js” there is no “dhtmlxgrid_excell_combo.js”. Please, add the needed file. You can find in the “dhtmlxGrid/codebase/excells” directory.
hi,
thank u sooo much it is working now as i was missing the file in the pro. but auto complete is yet not working and it is filtering only the first letter
hi,
actually u were absolutely correct that in pro ver a file was missing.thanks a ton 4 that.but the filter is only filtering the first alphabet like for o if 1000 records r there showing all not able to enter second alphabet pls help…
Unfortunately the issue cannot be reconstructed locally.
Please, have a look at the working sample:
dhtmlx.com/docs/products/dht … combo.html
If issue still occurs - please, open ticket at support.dhtmlx.com and provide a demo link or a complete demo where the issue can be reconstructed.
hello,
g8 support boss,its now working awesome.thank u vvvvvvvvvvvvvv much for support