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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

resize grid without losing the selection

Thread ID:

Created:

Updated:

Platform:

Replies:

132726 Sep 18,2017 11:18 AM UTC Oct 10,2017 12:41 PM UTC JavaScript 5
loading
Tags: ejGrid
hui zheng
Asked On September 18, 2017 11:32 AM UTC

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

Venkatesh Ayothi Raman [Syncfusion]
Replied On 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. 


hui zheng
Replied On 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


Venkatesh Ayothi Raman [Syncfusion]
Replied On 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. 


hui zheng
Replied On 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



Venkatesh Ayothi Raman [Syncfusion]
Replied On 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. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;