Hello together,
unfortunatelly, there is no event regarding smart rendering. It’s not possible to get notified about creation of new rows from rowsBuffer.
Workaround:
if( typeof dhtmlXGridObject != 'undefined' ) {
dhtmlXGridObject.prototype._update_srnd_view = function () {
var min = Math.floor(this.objBox.scrollTop / this._srdh);
var max = min + this._get_view_size();
if (this.multiLine) {
// Calculate the min, by Stephane Bernard
var pxHeight = this.objBox.scrollTop;
min = 0;
while (pxHeight > 0) {
pxHeight -= this.rowsCol[min] ? this.rowsCol[min].offsetHeight : this._srdh;
min++;
}
// Calculate the max
max = min + this._get_view_size();
if (min > 0) min--;
}
max += (this._srnd_pr || 0); //pre-rendering
if (max > this.rowsBuffer.length) max = this.rowsBuffer.length;
for (var j = min; j < max; j++) {
if (!this.rowsCol[j]) {
var res = this._add_from_buffer(j);
if (res == -1) {
if (this.xmlFileUrl) {
this._current_load = [j, (this._dpref ? this._dpref : (max - j))]; //TODO - more intelectual prefetching
if (this.callEvent("onDynXLS", [j, this._current_load[1]])) this.load(this.xmlFileUrl + getUrlSymbol(this.xmlFileUrl) + "posStart=" + j + "&count=" + this._current_load[1], this._data_type);
}
return;
} else {
if (this._tgle) {
this._updateLine(this._h2.get[this.rowsBuffer[j].idd], this.rowsBuffer[j]);
this._updateParentLine(this._h2.get[this.rowsBuffer[j].idd], this.rowsBuffer[j]);
}
if (j && j == (this._realfake ? this._fake : this)["_r_select"]) {
this.selectCell(j, this.cell ? this.cell._cellIndex : 0, true);
}
}
}
}
if (this._fake && !this._realfake && this.multiLine) this._fake.objBox.scrollTop = this.objBox.scrollTop;
this.callEvent("onSmartRenderingPerformed", []); //custom event!!
}
}
just attach the Event “onSmartRenderingPerformed” and provide your own event handler!
This method is just a workaround and won’t work when the API gets changed.
bye
golbie