Legacy code grid.control.$3_1 and ScrollPosition C1GridView to 2025v2

Posted by: enrique.pv-ext on 20 May 2026, 4:04 am EST

    • Post Options:
    • Link

    Posted 20 May 2026, 4:04 am EST

    Hi,

    Migrate from 2010v1 to 2025v2 in ASP.NET WebForms NET Framework 4.8.1.

    Using C1GridView from C1.Web.Wijmo.Controls.48.dll

    using C1.Web.Wijmo.Controls.C1GridView;

    What is grid.control.$3_16.$3 ?

        <script language="javascript" type="text/javascript">
    
            function pageLoad() {
                c1gv_restoreScrollPos("<%= C1GridView1.ClientID %>");
                try {
                    var grid = document.getElementById("<%= C1GridView1.ClientID %>");
                    //if (grid.control.$3_16.$3 != null)
                    //    if (grid.control.$3_16.$3.$0.attributes.getNamedItem("style") != null)
                    //        grid.control.$3_16.$3.$0.attributes.removeNamedItem("style");
                }
                catch (e) {
                    alert(e);
                }
            }
    

    and scroll position:

    function c1gv_restoreScrollPos(id) {
                _setPos(id);
               
                var grid = $find(id);
                if (grid && grid.get_callbackOptions()) { // handle native callbacks
                    var _doAjaxRequest = grid.doAjaxRequest;
                    grid.doAjaxRequest = function() {
                        $("#" + id + "_scrolldiv").unbind("scroll", _onScroll);
                        if (_doAjaxRequest) {
                            _doAjaxRequest.apply(grid, arguments);
                        }
                    }
    
                    var _onAjaxRequestComplete = grid.onAjaxRequestComplete;
                    grid.onAjaxRequestComplete = function() {
                        if (_onAjaxRequestComplete) {
                            _onAjaxRequestComplete.apply(grid, arguments);
                        }
    
                        _setPos(id);
                    }
                }
    
                function _setPos(id) {
                    var $scrollDiv = $("#" + id + "_scrolldiv");
                   
                    if ($scrollDiv.length) {
                        var sp = $("#" + id + "_scrollpos").val().split(" ");
                        $scrollDiv.scrollLeft(parseInt(sp[0])).scrollTop(parseInt(sp[1])).bind("scroll", id, _onScroll);
                    }
                }
    
                function _onScroll(e) {
                    $("#" + e.data + "_scrollpos").val(e.target.scrollLeft + " " + e.target.scrollTop);
                }
            }

    any suggestions ? Thanks all!

  • Posted 20 May 2026, 8:15 am EST

    Hello Enrique,

    1. What is grid.control.$3_16.$3?

    That notation is from minified/obfuscated internal Wijmo JavaScript — it is a private, undocumented property path generated by the build process, not a public API. Names like $3_16 and $3 are mangled identifiers that correspond to internal objects (likely the scroll panel or a column header row element). These will change between every release of the library, which is exactly why that code is commented out — it broke when the version changed.

    We think the original intent was to remove an inline style attribute from an internal DOM element (probably a frozen/fixed row or header). You should achieve that through the public API or safe DOM traversal instead.

    1. What is scroll position

    It seems like ‘c1gv_restoreScrollPos’ is a custom JavaScript helper that keeps the grid from jumping back to the top-left corner after a postback or Ajax refresh. It works by saving the grid’s current scroll position (X and Y) into a hidden field every time the user scrolls, then reading those saved values back and re-applying them to the scroll container after the grid redraws. It also wraps the grid’s internal Ajax methods so the save/restore cycle runs automatically on every async callback, making the scroll position feel seamless to the user across sorting, paging, and filtering operations.

    If you could provide more details on the implementation and current/expected behavior/visuals, we can try implementing the same using latest APIs.

    Regards,

    Uttkarsh.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels