1.When I select one item in combo,console say that " Uncaught TypeError: Cannot read property ‘0’ of undefined".
I do not konw what is wrong with my combo.I use the code to make grid linked to combo as the samples:[url]http://dhtmlx.com/docs/products/dhtmlxDataStore/samples/02_combo/04_combo2grid.html[/url]
This is part of my code:
[code] mydatastore.data.scheme({
$init:function(myCombo){
myCombo.value = myCombo.yz_name;
myCombo.text = myCombo.yz_name;
}
});
mydatastore.parse(<?php echo $json;?>);
var myCombo = new dhtmlXCombo("combo_container","combo_name","300px");
myCombo.enableFilteringMode(true);
myCombo.sync(mydatastore);
myGrid.setImagePath("http://218.244.140.222/dhtmlxSuite_v42_pro/sources/dhtmlxGrid/codebase/imgs/");
myGrid.setHeader("收费项目,计费日期,计费起始日期,计费终止日期,面积,单价,应记金额,业主名称");
myGrid.setColumnIds("service_name,time_of_invoice,start_time,end_time,wy_area_fee,rate,,yz_name");
myGrid.setInitWidths("200,200,200,200,200,200,200,200");
//myGrid.setInitWidthsP("14,14,14,14,14,14,14");
myGrid.setColAlign("left,left,left,left,left,left,left,left");
myGrid.setColTypes("ro,ro,ro,ro,ro,ro,ed[=c4*c5],ro");
//myGrid.setColumnHidden(7,true);
myGrid.setColSorting("str,str,str,str,str,str,str");
myGrid.attachHeader(“#text_filter,#text_filter,#text_filter,#text_filter,#text_filter,#text_filter,#text_filter”);
myGrid.setMathRound(2);
myGrid.init();
myGrid.enableSmartRendering(true,50);
myGrid.enablePaging(true,50,10,“pagingArea”,true,“infoArea”);
myGrid.setPagingSkin(“bricks”);
myGrid.loadOrderFromCookie();
myGrid.loadSortingFromCookie();
myGrid.loadSizeFromCookie();
myGrid.enableAutoSizeSaving();
myGrid.enableSortingSaving();
myGrid.enableOrderSaving();
myGrid.sync(mydatastore);
ownerinfo_myForm.bind(myGrid);
myGrid.bind(myCombo,function(data,filter){
return myGrid.cells2(data,7).getValue() == filter.text;
});[/code]
2.who has the instruction of the function in “myGrid.bind(myCombo,function(data,filter){});” I can not find relative documentation about how to use the anonymous function in bind.And I do not know what the parameters(data,filter) mean in this function.It is a pity that documentation does not say more detail about the anonymous function,which make me hard to learn it.Who can explain the basic use and the mean of some basic parameters?