Grid linked to combo,Uncaught TypeError: Cannot read propert

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?

(2) When you are using grid.bind(combo, handler), the grid component will be filtered each time as new value is selected in the combo. The handler function is a custom filtering handler, same as for custom filtering. It allows to define the exact rule, how data need to be filtered by the value of combo.

docs.dhtmlx.com/grid__filtering. … cfiltering

Tanks your reply.
I have another problem.
I use the follow code to initialize my combo:

var myCombo = new dhtmlXCombo("combo_container","combo_name","300px"); myCombo.sync(mydatastore); mydatastore.data.scheme({ $init:function(obj){ obj.value = obj.yz_name; obj.text = obj.yz_name; } });
and I use the follow code to let myGrid binds mycombo

myGrid.bind(myCombo,function(data,filter){ return myGrid.cells(data,7).getValue() == filter.text; });
so far everything work well,But now I have new need:I want create a new mycombo2 with the same datastore(mydatastore) ,use different field instead of “yz_name”. I do not how to write $init:function or maybe some others way create a new combo and then let myGrid binds mycombo2.In actually,what I want to realize is that use two combos with same datastore to query one grid.Hope you can get my thought.

1.When I select one item in combo,console say that " Uncaught TypeError: Cannot read property ‘0’ of undefined".

Unfortunately the issue cannot be reproduced locally.
The following sample works well for me: “dhtmlxDataStore\samples\02_combo\04_combo2grid.html”

Please, note at the $init function of the datastore. Please, make sure that the parsing to your datastore data containing the “yz_name” field.

If the problem still occurs for you please, provide with a complete demo, where the issue can be reconstructed.
Here you can find a tutorial about creating a complete demo:
docs.dhtmlx.com/tutorials__auxil … pport.html