Grid with persistence and re-ordering enabled is re-ordering the column by itself randomly

I have a Grid with persistence and re-ordering enabled along with frozen columns. I am facing an issue occasionally when the Grid will re-order the columns by itself. I got the state of the Grid by using  Grid.GetPersistData() from the documentation page and when I print it out on my console: there is no re-ordering of the Grid but the browser shows the columns in different order. All the Grids have different IDs and the persistence is not handled manually. I am not sure how it is saved in the browser localstorage when EnablePersistence is set to true but it isn't the same as the value of the Grid state that I am getting when I do Grid.GetPersistData()​​.


11 Replies

NP Naveen Palanivel Syncfusion Team June 27, 2022 04:41 AM UTC

Hi Nick,

Query : Grid with persistence and re-ordering enabled is re-ordering the column by itself randomly

We checked your query by creating sample based on reported scenario. But we are unable to reproduce the reported issue. Please refer the attached sample and video demonstration
for your reference.


If you are still facing the issue, kindly get back to us with the following details


  1. Share us the entire Grid code snippet.
  2. Video demonstration of the problem.
  3. Share the screenshot of the issue you are facing.
  4. If possible, Share issue reproducible sample.


Please get back to us if you have further queries.


Regards,

Naveen Palanivel


Attachment: persistGrid_cdb1c373.zip


NI Nick replied to Naveen Palanivel June 27, 2022 09:26 PM UTC

I have attached a video of the issue on our own application while debugging. The attached project has the exact grid properties that we set on our project. The issue from observation comes up randomly ever since we set the persistence to true.


Attachment: GridTest_19d6878b.zip


NP Naveen Palanivel Syncfusion Team June 28, 2022 05:56 PM UTC

Hi Nick,  


Sorry for the Inconvenience.


We are currently Validating  the reported query at our end and we will update the further details within one  business days(June 30, 2022). Until then we appreciate your patience.


Regards,

Naveen Palanivel.



NP Naveen Palanivel Syncfusion Team July 1, 2022 03:44 AM UTC

Hi Nick,


We checked your query and we would like to inform in normal state we reorder the columns of the grid, column and its index are same. But we enable the persistence  and reorder the column of the gird are based on the index. Persistence  is used to maintain the data in grid after refresh grid also, when we reorder the column and we want maintain grid in the reorder state. In Grid.GetPersistdata  data of the grid are maintain by column and its index. We want after reorder the column and index correct to the column, persistence will not occurs.


Please get back to us if you have further queries.


Regards,

Naveen Palanivel



NI Nick replied to Naveen Palanivel July 5, 2022 12:59 PM UTC

Hi Naveen, 


There is no Grid column re-ordering applied in the video I sent. The columns got re-ordered on its own and it happens randomly like I stated before. I was using Grid.GetPersistdata​ to check the Grid data and not for persisting the Grid.



NP Naveen Palanivel Syncfusion Team July 7, 2022 06:51 PM UTC

Hi Nick,


We checked your query by given sample in the pervious response but unfortunately reported issue is not occurs. We have attached video demonstration for Grid.GetPersistance in both default gridcolumn video and after GridColumn is re-ordered.


If misunderstood your query ,kindly shared an issue replicating sample and the more details about your query to validate further.


Regards,

Naveen Palanivel



NP Naveen Palanivel Syncfusion Team July 7, 2022 06:53 PM UTC

Please Kindly refer the video Demonstration of Grid.getPersistance in  default gridcolumn


Attachment: Grid.GetPersist_GridColumn_No_Reorder_6111c23d.zip


NP Naveen Palanivel Syncfusion Team July 7, 2022 06:55 PM UTC

Please Kindly refer the video Demonstration of Grid.getPersistance after gridcolumn is Reorder


Attachment: Grid.GetPersist_Gidcolumn_Reordered_af896595.zip


NI Nick replied to Naveen Palanivel July 7, 2022 07:11 PM UTC

I saw the videos and that is what I get too. But in the video that I linked of our application, you can see that the value of the Grid state I get from Grid.GetPersistData() is correct but it is not the same as what is shown by the browser. I have never had issues with the Grid state value that I get from Grid.GetPersistData()​. I am not even using this at all in my production code. It is the value of the state that is being saved into the browser localstorage and retrieved to set the Grid that is not consistent. I am not sure how it is saved when we do EnablePersistence="true" but it has rendered it with the wrong column order multiple times like you can see in the video I posted.




MS Monisha Saravanan Syncfusion Team July 11, 2022 01:04 PM UTC

Hi Nick,


We are currently validating your query at our end. We will update further details within two business days on or before (13.07.2022). Until then we appreciate your patience.


Regards,

Monisha



NP Naveen Palanivel Syncfusion Team July 13, 2022 05:32 PM UTC

Hi Nick,


Thanks for the patience.


We have analysed your shared information and we suggest you to check the reported issue after changing the Grid ID property (i.e. ID="MyGrid1") and kindly check the Grid state after changing the ID. If you still face the reported issue then kindly get back to us with the below details.


1. Share the video demo after changing the ID property. (Kindly prepare a video demo by changing the Id propert and then display the state of the Grid)

2. Share us the way you have copied the Grid state.


The above requested details will be very helpful for us to validate the reported query at our end and provide the solution as early as possible.



Regards,

Naveen Palanivel.


Loader.
Up arrow icon