out of memory in IE when filtering grid

Hi team,



I’m creating a grid using pro v16 b80512.I’m trying to do server side filtering based on the big dataset example.

I’m using a custom header to do the filter.



here’s my js code :



var sogrid;

function doInitGrid(gridname,pagingArea){

                

                sogrid = new dhtmlXGridObject(gridname);

                sogrid.imgURL = “codebase/imgs/”;                 

                sogrid.enablePaging(true,10,null,pagingArea);

                sogrid.setSkin(“light”);

                sogrid.setPagingSkin(“toolbar”);                

                if (sogrid.setColspan)

                 sogrid.attachEvent(“onBeforeSorting”,customColumnSort)                

                sogrid.attachEvent(“onEditCell”,function(stage,id,ind){

                 return false;                

                });

                sogrid.init();             

                sogrid.attachEvent(“onBeforePageChanged”,function(){

             if (!this.getRowsNum())

                 return false;

             return true;

             })                

                sogrid.loadXML(“xml/salesorder.xml”);                                

}



function customColumnSort(ind){        

            var a_state = sogrid.getSortingState();

            window.s_col=ind;

            window.a_direction = ((a_state[1] == “des”)?“asc”:“des”);

reloadGrid();

            return true;

}

function reloadGrid(){        

            sogrid.clearAndLoad(“xml/salesorder.xml”);            

            if (window.a_direction)

                sogrid.setSortImgState(true,window.s_col,window.a_direction);

}



here’s my testing xml :



<?xml version="1.0" encoding="UTF-8"?>



    

        

            SO#

        

        

            Order Date

        

        

            Order Type

        

        

            Customer

        

        

            Customer PO

        

        

            Project ID

        

        

    





        <![CDATA[
                <input type='text' name='soNumberFilter' onclick='(arguments[0]||event).cancelBubble=true;'
onchange='reloadGrid;' style='width:90%; font-size:8pt; font-family:Tahoma;' />,
                <input type='text' name='orderDateFilter' onclick='(arguments[0]||event).cancelBubble=true;'
onchange='reloadGrid;' style='width:90%; font-size:8pt; font-family:Tahoma;' />,
                <select name='orderTypeFilter' onclick='(arguments[0]||event).cancelBubble=true;'
onchange='reloadGrid;' style='width:90%; font-size:8pt; font-family:Tahoma;'>
                    
                        a
                        b
                        c                         
                ,
                <input type='text' name='customerFilter' onclick='(arguments[0]||event).cancelBubble=true;'
onchange='reloadGrid;' style='width:90%; font-size:8pt; font-family:Tahoma;' />,
                <input type='text' name='cutomerPOFilter' onclick='(arguments[0]||event).cancelBubble=true;'
onchange='reloadGrid;' style='width:90%; font-size:8pt; font-family:Tahoma;' />,
                <input type='text' name='projectIDFilter' onclick='(arguments[0]||event).cancelBubble=true;'
onchange='reloadGrid;' style='width:90%; font-size:8pt; font-family:Tahoma;' />
            ]]>

        





    

        

            0000000001



a

            Customer One

            

            



    

    





my question is :

If i change the filter for example using the dropdown, the grid will reload from server side but when i click the dropdown again the IE will show this message : Out of memory in line :11 or Stack overflow in line 13.

the message is always appear so i have to force to close the IE.



but when i’m using firefox it seems ok except that after reloading from the server side the sorting won’t work anymore.



is it a bug or there’s an error in my code?



Thanks in advance.



dian

In order to reload grid select onchange event handler should be as follows:

<select name=‘orderTypeFilter’ onclick=’(arguments[0]||event).cancelBubble=true;’ 
onchange=‘reloadGrid();’ style=‘width:90%; font-size:8pt;
font-family:Tahoma;’>


instead of:

   <select name=‘orderTypeFilter’ onclick=’(arguments[0]||event).cancelBubble=true;’
onchange=‘reloadGrid;’ style=‘width:90%; font-size:8pt;
font-family:Tahoma;’>


Also reloadGrid() function should send a request to a server-side program (not to the static xml) and pass values of input and select filters.

well actually i already tried with
<select name=‘orderTypeFilter’ onclick=’(arguments[0]||event).cancelBubble=true;’ 
onchange=‘reloadGrid();’ style=‘width:90%; font-size:8pt;
font-family:Tahoma;’>

and my code originally using server side program in reloadGrid() function. And after testing it with the code above the error still the same.

We have tested the 50000_paging sample with select as a filter inside header. There are not any issues in this case.

If problem persists,  please, provide the sample where issue can be recreated  to support@dhtmlx.com


Hi team,

I have search and re-test my code and finally I found out that if i combine the server side filtering and enableHeaderMenu it will cause the problem.
After i remove   syntax in my XML the “out of memory” and "stack overflow " error dissapear.

Please advise for this error. Thanks.

dian.kwok

The issue still can not be reconstructed. Please,  contact us directly at the  support@dhtml.com  and we will send you  the sample (as hiding columns is the PRO edition feature).