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

MultiSelecting rows after grid refresh

Hi,

i have an ASP grid and a custom refresh button.

<ej:Grid ID="MasterGrid" runat="server" AllowScrolling="true" AllowFiltering="true" AllowSorting="true" AllowTextWrap="true" >
        <DataManager URL="../Vehicles/GetMasterData" Adaptor="WebApiAdaptor" />
         <ScrollSettings Height="600" AllowVirtualScrolling="true" VirtualScrollMode="Continuous" EnableVirtualization="true" /> 
        <FilterSettings FilterType="Excel"></FilterSettings>
    </ej:Grid> 

The button calls this JS function

          function refreshMasterGrid() {
              $("#MasterGrid").ejGrid({ dataSource: ej.DataManager({ url: "../Vehicles/GetMasterData", adaptor: new ej.WebApiAdaptor() }) });
          };

The problem is that after refresh when i start clicking on the grid all the rows that i click become selected (like multiselect), even tho there is no multiselection enabled

If I scroll the grid after refresh (and before clicking on rows) then the rows are selected normally, one by one.

Also, if it helps, when i refresh, click on a grid row (without scrolling first) and then start to scroll i get this js error:
Uncaught TypeError: Cannot read property 'cells' of undefined
pointing to ej.grid.min.js

Thank you for the help.






1 Reply

PK Prasanna Kumar Viswanathan Syncfusion Team August 25, 2016 12:42 PM UTC

Hi Semper, 

Thanks for contacting Syncfusion support. 

We created a sample according to your code example and we did not face the mentioned issues in our sample. 

Find the code example and sample: 


  <ej:Button ID="ButtonNormal" runat="server" Size="Mini" ClientSideOnClick="btnClick" ShowRoundedCorner="false" Text="Refresh"></ej:Button> 
     <ej:Grid ID="EmployeesGrid" runat="server" AllowSorting="true" AllowFiltering="true" AllowTextWrap="true" AllowScrolling="true"> 
          <DataManager URL="api/Values" Adaptor="WebApiAdaptor"></DataManager> 
          <ScrollSettings Height="600" AllowVirtualScrolling="true" VirtualScrollMode="Continuous" EnableVirtualization="true" />  
           <FilterSettings FilterType="Excel"></FilterSettings> 
    </ej:Grid> 
 
   <script> 
       function btnClick() { 
           $("#EmployeesGrid").ejGrid({ dataSource: ej.DataManager({ url: "api/Values", adaptor: new ej.WebApiAdaptor() }) }); 
       } 
   </script> 


To reproduce the issue we need the following details, 

1. Video demo of an issue. 

2. Essential Studio Version details. 

3. Provide the stackrace of an script error. 

3. If possible, reproduce the issue in the attached sample. 

Regards, 
Prasanna Kumar N.S.V 
 


Loader.
Up arrow icon