grid does not respond instantly for width when window size event occurs

$("#Grid").ejGrid({ 
       dataSource: window.gridData, 
       allowPaging: true, 
       allowSorting: true, 
       isResponsive: true, 
       minWidth: 600, 
       columns: [ 
                  ------------------- 
                ] 
            });      
        }); 

ref: https://www.syncfusion.com/forums/127793/resizing-the-ejgrid

and my code is as follows.
<script>
 $( window ).resize(function() {
        var myHeight = (Math.floor($("#ResultPlaceholder").height() - 140)/40);
        $("#ResultGrid").ejGrid({
            pageSettings: { pageSize :  myHeight },
            isResponsive: true, 
            minWidth: 100
        });
        
        console.log($("#ResultGrid").width());
        console.log($(window).width());
    });

</script>

but sometimes according to changed window size, the grid is not reponsive for the width.

in console.log, the $('#ResultGrid').width() does not change at all, but $(window).width() changes.

Thank you in advance.

Kind Regards,


2 Replies

MP Manivannan Padmanaban Syncfusion Team April 4, 2018 12:43 PM UTC

Hi Dongil, 

Thanks for contacting syncfusion support. 

We have analyzed your query and we are able to understand that, the grid is not responsive when the window is resized. If you need to maintain the grid in responsive mode while resizing the browser window enable isResponsive and minWidth property in the grid.   

From your code example, we could see that you have already enabled the isresponsive property so the grid is remains responsive only when the browser is resized there is no need to resize the grid externally. Please share the below details that help us to resolve the issue as early as possible, 

  1. For resizing the grid you have used both external resize event and isresponsive property of ejgrid. Please confirm is there any specific reason for it (or) you have faced any difficulties while resize the grid without external resize event. If yes, please share the details.
  2. Share the Essential studio version

Regards, 

Manivannan Padmanaban. 



DS Dongil Shin April 4, 2018 11:31 PM UTC

Hi, I applied the code below. the significant difference is in IE 11, the responsive does not work sometimes according to the window resized.

Please let me know why chrome browser works but in IE11 it does not work.

Thank you.
Kind Regards,

Loader.
Up arrow icon