How to know dataview already loaded

how to know dataview already loaded?load method is async.second run load method,datacount=0.
my code:
goods = new dhtmlXDataView({
container: “goods_container”,
type: {
template:“

#cphm##kcjs#
”,
template_loading: “loading…”,
width:71,
height:50,
margin: 0,
padding: 0
},
x_count: 5,
y_count: 5
});
goods.define(“select”,true);
goods.load(encodeURI(“get_goods_json.asp?&etc=” + new Date().valueOf()),“json”);

function update1(){
goods.clearAll();
goods.load(encodeURI(“get_goods_json.asp?&etc=” + new Date().valueOf()),“json”,update2())
}
function update2(){
alert(goods.dataCount());
//return value: goods.dataCount=0
//why? })

The third parameter should be a function that need to be called after loading:

goods.load(encodeURI(“get_goods_json.asp?&etc=” + new Date().valueOf()),“json”,update2)

In your code you have used goods.load(encodeURI(“get_goods_json.asp?&etc=” + new Date().valueOf()),“json”,update2b[/b])