js/jquery.treegrid.js
function() {
            var $this = $(this);
            //Save state on change
            $this.on("change", function() {
                var $this = $(this);
                if (typeof($this.treegrid('getSetting', 'onChange')) === "function") {
                    $this.treegrid('getSetting', 'onChange').apply($this);
                }
            });
            //Default behavior on collapse
            $this.on("collapse", function() {
                var $this = $(this);
                if (typeof($this.treegrid('getSetting', 'onCollapse')) === "function") {
                    $this.treegrid('getSetting', 'onCollapse').apply($this);
                }
            });
            //Default behavior on expand
            $this.on("expand", function() {
                var $this = $(this);
                if (typeof($this.treegrid('getSetting', 'onExpand')) === "function") {
                    $this.treegrid('getSetting', 'onExpand').apply($this);
                }

            });

            return $this;
        }
function() {
            var $this = $(this);
            //Save state on change
            $this.on("change", function() {
                var $this = $(this);
                if (typeof($this.treegrid('getSetting', 'onChange')) === "function") {
                    $this.treegrid('getSetting', 'onChange').apply($this);
                }
            });
            //Default behavior on collapse
            $this.on("collapse", function() {
                var $this = $(this);
                if (typeof($this.treegrid('getSetting', 'onCollapse')) === "function") {
                    $this.treegrid('getSetting', 'onCollapse').apply($this);
                }
            });
            //Default behavior on expand
            $this.on("expand", function() {
                var $this = $(this);
                if (typeof($this.treegrid('getSetting', 'onExpand')) === "function") {
                    $this.treegrid('getSetting', 'onExpand').apply($this);
                }

            });

            return $this;
        }
function ( ) { var $this = $ ( this ) ; //Save state on change
 $this . on ( "change" , function ( ) { var $this = $ ( this ) ; if ( typeof ( $this . treegrid ( 'getSetting' , 'onChange' ) ) === "function" ) { $this . treegrid ( 'getSetting' , 'onChange' ) . apply ( $this ) ; } } ) ; //Default behavior on collapse
 $this . on ( "collapse" , function ( ) { var $this = $ ( this ) ; if ( typeof ( $this . treegrid ( 'getSetting' , 'onCollapse' ) ) === "function" ) { $this . treegrid ( 'getSetting' , 'onCollapse' ) . apply ( $this ) ; } } ) ; //Default behavior on expand
 $this . on ( "expand" , function ( ) { var $this = $ ( this ) ; if ( typeof ( $this . treegrid ( 'getSetting' , 'onExpand' ) ) === "function" ) { $this . treegrid ( 'getSetting' , 'onExpand' ) . apply ( $this ) ; } } ) ; return $this ; }
Initialize events from settings

@returns {Node}
Initialize events from settings