We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

resize grid without losing the selection

Hello,
We use setDimension() to set grid size when parent container's size changes (So that we don't need to redraw grid and lose the user's current selection and grouping settings etc). The problem is that after setDimension(), the width of grid lines doesn't change to fit to the new dimension (see screenshot attached). So how can we get grid lines refreshed after setDimension() call?  We cannot use isResponsive setting as we want the grid table to fit in container (so no overflow).   

 
      var datagrid;
      function onLoad() {
            // the datasource "window.gridData" is referred from jsondata.min.js
            var data = ej.DataManager(window.gridData).executeLocal(ej.Query().take(50));
            datagrid = $("#Grid").ejGrid({
              dataSource: data,   
              allowScrolling: true,allowResizing :true,
              allowGrouping: true,
              allowPaging:true,
          pageSettings: {
            pageSize: 250
          },
               allowSelection: true,
          selectionType : "single",
          selectionSettings: { selectionMode: ["cell"] },
                columns: [
                        { field: "OrderID", headerText: "Order ID", width: 75 , textAlign: ej.TextAlign.Right},
                        { field: "CustomerID", headerText: "Customer ID", width: 80 },
                        { field: "EmployeeID", headerText: "Employee ID", width: 75, textAlign: ej.TextAlign.Right, priority: 4 },
                        { field: "Freight", width: 75, format: "{0:C}", textAlign: ej.TextAlign.Right, priority: 3 },
                        { field: "OrderDate", headerText: "Order Date", width: 80, format: "{0:MM/dd/yyyy}", textAlign: ej.TextAlign.Right, priority: 2 },
                        { field: "ShipCity", headerText: "Ship City", width: 110, priority: 2 }
                ]
            }).ejGrid("instance");
          onResize();
        }
      
      function onResize() {
       datagrid.setDimension($(window).height() - 100, $(window).width() - 50);
      }
   


Thanks
Hui

Attachment: grid_7b8932ae.zip

5 Replies

VA Venkatesh Ayothi Raman Syncfusion Team September 19, 2017 12:51 PM UTC

Hi Hui, 

Thanks for contacting Syncfusion support. 

This an already known issue and we have logged this “Empty white space shown in Grid while rendering the Grid in splitter control with scroller” as breaking issue and fixed internally. This fix will be included in our Upcoming Volume 3, SP2 2017 release which is expected to be rolled out at end of September,2017

Regards, 
Venkatesh Ayothiraman. 



HZ hui zheng September 19, 2017 01:01 PM UTC

Hi, Thank you for the reply. Currently, we are using  "syncfusion-javascript": "15.2.43". I will come back the end of Sep to check if fix is included and in which release...


Thanks!

Hui



VA Venkatesh Ayothi Raman Syncfusion Team September 20, 2017 03:58 AM UTC

Hi Hui, 

Thanks for the update. 

We will let you know once Volume 3, SP2 rolled out and whether the fix is included or not. Until we appreciate your patience. 

Regards, 
Venkatesh Ayothiraman. 



HZ hui zheng October 9, 2017 07:51 AM UTC

Hello.

Is this fixed in your new release? Or what release will you include the fix?


Thanks!

Hui




VA Venkatesh Ayothi Raman Syncfusion Team October 10, 2017 12:41 PM UTC

Hi Hui, 


Sorry for the inconvenience caused.   
  
  
Due to some complexity, the fix for this issue will be include in 2017 volume 4 release which is expected to be rolled out in month of November,2017. 
 
Regards, 
Venkatesh Ayothiraman. 


Loader.
Up arrow icon