Saving on 2nd grid affects 1st gird

Hello,


I currently have 2 grids on a single page. Each has its own ID, and data managers. Both  have inline editing enabled.

Whenever I try to save a change on Grid2, the data manager of Grid1 executes. Aside from the grid IDs and data manager URLs, both grids are identical.

Grid 1

<ejs-grid id="grid1"

          gridLines="Horizontal">


    <e-data-manager insertUrl="<CreateUrl>"

                    url="<ReadUrl>"

                    updateUrl="<UpdateUrl>"

                    removeUrl="<DeleteUrl>"

                    adaptor="WebApiAdaptor" ></e-data-manager>


        <e-grid-editsettings allowAdding="false"

                             allowDeleting="true"

                             allowEditing="true"

                             mode="Normal"

                             showConfirmDialog="false"

                             newRowPosition="Top"

                             allowNextRowEdit="true"

                             showDeleteConfirmDialog="true"

                             allowEditOnDblClick="true"></e-grid-editsettings>


    <e-grid-columns>

                        <e-grid-column field="Title" headerText="Title"

                                       width="200"

                                       type="string"

                                       defaultValue="-"

                                       allowEditing="true"></e-grid-column>

    </e-grid-columns>

</ejs-grid>


Grid2
<ejs-grid id="grid2"

          gridLines="Horizontal">


    <e-data-manager insertUrl="<CreateUrl>"

                    url="<ReadUrl>"

                    updateUrl="<UpdateUrl>"

                    removeUrl="<DeleteUrl>"

                    adaptor="WebApiAdaptor" ></e-data-manager>


        <e-grid-editsettings allowAdding="false"

                             allowDeleting="true"

                             allowEditing="true"

                             mode="Normal"

                             showConfirmDialog="false"

                             newRowPosition="Top"

                             allowNextRowEdit="true"

                             showDeleteConfirmDialog="true"

                             allowEditOnDblClick="true"></e-grid-editsettings>


                        <e-grid-column field="Title" headerText="Title"

                                       width="200"

                                       type="string"

                                       defaultValue="-"

                                       allowEditing="true"></e-grid-column>

</ejs-grid>


3 Replies

JC Joseph Christ Nithin Issack Syncfusion Team November 9, 2021 03:06 PM UTC

Hi Andrew, 

  Greetings from Syncfusion support. 

  Based on your query, you are having two grids, with different `Id’s` but having the same dataManager and the url’s. When you try to edit in the second grid, the first grid’s values are changed.  

   Using the code example provided we have prepared a sample, but we were not able to reproduce the reported issue. We would like you to share the following details so that we may be able to provide a better solution ASAP. We have also attached the sample for your convenience. 

  • Please share a simple sample to reproduce the issue or try to reproduce the issue in the attached sample.
  • Please share the Syncfusion package version you are using.
  • Please share the Syncfusion script version you are using.


Please get back to us for further details. 

Regards,
Joseph I. 



AN Andrew November 15, 2021 03:24 AM UTC

Hi Joseph!

Thanks for the sample. it pointed us towards the right direction.  The problem was caused by one of our TagHelpers.


Thanks!



JC Joseph Christ Nithin Issack Syncfusion Team November 15, 2021 01:15 PM UTC

Hi Andrew,

  Thanks for the update.

  We are glad that the provided solution solved the reported problem.

   Please get back to us for further queries regarding this.

Regards,
Joseph I


Loader.
Up arrow icon