Dynamic Smart Rendering with Tree Grid

Dynamic Smart Rendering on a Grid doesen’t seem to work if one of the columns is set to “tree” (ver 2.6 Pro). The Grid will only display the first “x” results based on the number of rows set to render.

Are there any plans to release a fix to allow a Tree Grid to use Smart Rendering?

smart Rendering is available in dhtmlxTreeGrid.
Please, look at the working example http://www.dhtmlx.com/docs/products/dhtmlxTreeGrid/samples/02_loading_big_datasets/03_treegrid_srnd.html
Please try to update your dhtmlxGrid version.
If issue still confirms please provide any kind of sample

When I enable smart rendering for the grid the scrollbar doesen’t go down to the end of the table (it seems to stop at the first x records based on what the fetch size is set to).

The example above seems to show smart rendering for loading nodes only.

The following post seems to imply that smart rendering isn’t supported by the grid if using a tree column (the person has the exact same issue as I do).

viewtopic.php?f=2&t=16049&hilit=tree+dynamic&start=10

dhtmlxTreeGrid does support static Smart Rendering mode. You can see example here dhtmlx.com/docs/products/dht … _srnd.html
In such mode all rows are loaded at once, but only those are rendered which should be displayed to the user.

dhtmlxTreeGrid does not support dynamic loading of one level. One level of rows in TreeGrid should be loaded at once. You can use dynamic loading of sub items only.

Thanks for the response.

In the post I linked above it mentions that there is an experimental version that enables this feature. Is it possible for me to try this?

Please open ticket at support.dhtmlx.com/ and we will send you this extension

Hi,

I opened a ticket for this on the 14th and still haven’t had any reply.

Please can you tell me when you will be able to send me the extension?

Thanks for the extension, the Dynamic smart rendering now works fine with Tree Grid.

However in this version I cannot correct the bug with IE 8 when smart rendering is used. In the past I had to add the following code to dhtmlxgrid.js to correct this (I found this in another post) but it doesen’t seem to work if I add it to this version. Can you tell me how I can get it working? Out of interest, I noticed that I still had to add this code when I upgraded to v2.6 so I’m wondering why it wasn’t included even in the official release?

dhtmlXGridObject.prototype.render_dataset = function(min, max) {
    //normal mode - render all
    //var p=this.obj.parentNode;
    //p.removeChild(this.obj,true)
    if (this._srnd) {
        if (this._fillers)
            return this._update_srnd_view();

        max = Math.min((this._get_view_size() + (this._srnd_pr || 0)), this.rowsBuffer.length);

    }

    if (this.pagingOn) {
        min = Math.max((min || 0), (this.currentPage - 1) * this.rowsBufferOutSize);
        max = Math.min(this.currentPage * this.rowsBufferOutSize, this.rowsBuffer.length)
    } else {
        min = min || 0;
        max = max || this.rowsBuffer.length;
    }

    for (var i = min; i < max; i++) {
        var r = this.render_row(i)

        if (r == -1) {
            if (this.xmlFileUrl) {
                if (this.callEvent("onDynXLS", [i, (this._dpref ? this._dpref : (max - i))]))
                    this.load(this.xmlFileUrl + getUrlSymbol(this.xmlFileUrl) + "posStart=" + i + "&count=" + (this._dpref ? this._dpref : (max - i)), this._data_type);
            }
            max = i;
            break;
        }

        if (!r.parentNode || !r.parentNode.tagName) {
            this._insertRowAt(r, i);
            if (r._attrs["selected"] || r._attrs["select"]) {
                this.selectRow(r, r._attrs["call"] ? true : false, true);
                r._attrs["selected"] = r._attrs["select"] = null;
            }
        }


        if (this._ads_count && i - min == this._ads_count) {
            var that = this;
            this._context_parsing = this._context_parsing || this._parsing;
            return this._contextCallTimer = window.setTimeout(function() {
                that._contextCallTimer = null;
                that.render_dataset(i, max);
                if (!that._contextCallTimer) {
                    if (that._context_parsing)
                        that.callEvent("onXLE", [])
                    else
                        that._fixAlterCss();
                    that.callEvent("onDistributedEnd", []);
                    that._context_parsing = false;
                }
            }, this._ads_time)
        }
    }

    if (this._srnd && !this._fillers) {
        var fh = this.rowsBuffer.length - max;
        this._fillers = [];
        while (fh > 0) {
            this._fillers.push(this._add_filler(max, Math.min(fh, 50000)));
            max += 50000;
            fh -= 50000;
        }
    }

    //p.appendChild(this.obj)
    this.setSizes();
};

Hi,

Is the dynamic smart rendering for TreeGrid publicly available or is it provided on a per-request basis. It is currently not functioning on Pro v.3.0 build 110707.

Regards
-Gabriel

Unfortunately the dynamic smart rendering functionality wasn’t released officially. Also it’s not clear if it will be available officially in the future.
You may open ticket at http://support.dhtmlx.com/ and we shall send you this extension.