for (var i = 0; i < this.count; i++) {
var record = this.data.get(i);
var appointment = isc.IButton.create({
ID:"schedule_" + record.ID,
title: record.StartTime,
desc: record.Description
});
}
it seems that this.data.get(i) doesn’t return any record. The datasource is tested in listGrid with successful result. Is there any module to load beside databinding?
ResultSets load data asynchronously, that may be the problem you’re having. You can use the dataArrived() notification to find out when data has loaded.
dataArrived works like any other SmartClient method, however, you would probably find the GridPager example very useful, it’s very similar to what you’re trying to do - or may be exactly what you’re trying to do
this.count = this.data.getLength();
this.fieldArray = new Array();
this.data.dataArrived(0,this.count);
this.data is a resultset.
get an error message in log:
7:49:03.485:XRP2:INFO:xmlSelect:selectNodes: expression: //default:return returned Array[3]: 0ms
07:49:03.500:XRP2:INFO:ResultSet:isc_ResultSet_273:creating auto-operation for operationType: fetch
07:49:03.516:XRP2:INFO:ResultSet:isc_ResultSet_273:setCriteria: filter criteria unchanged
07:49:03.532:XRP2:WARN:Log:TypeError: this.data.dataArrived is not a function
that is a good grid component, but not what I work on. I try to put appointments on a calender like outlook. The function iterates the datasource/resultset and display the appointment at the right spot.
Do you have sample code to read from resultset or datasource directly?
We directed you to look at the GridPager example not in order to use the actual GridPager component, but to see how it is implemented. It demonstrates correct use of dataArrived and other APIs.