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

SF DataGrid does not emit event if the Grid was refreshed [solved]


I have a Problem.
I have SF Data Grid as Overview in my Program. Now when I go into Details and change some Data and press Save then my Programm will refresh the Overview. I have made a SelectionChanged Event which will cause the Programm to display a summary on the left side. This is working fine if I do not refresh the Overview. If I refresh the event won't get executed.

Anyone can help?


7 Replies

GG Gowtham Gopalsamy Syncfusion Team October 3, 2019 01:05 PM UTC

Hi Benjamin   
Thank you for using Syncfusion controls.    
We have analyzed the reported query to edit some value in SfDataGrid and refresh the SfDataGrid by using SfDataGrid.View.Refresh method in the save button. SelectionChanged event is fired after saving the data when we select any row in SfDataGrid.    
We are unable to reproduce your reported scenario from our end and we have provided the tested sample. So, Please provide more details or modify the sample as per your requirement . It will help us to investigate further details and provide the earlier prompt solution.   
Please refer the below sample link.   
Please let us know if you require further other assistance from us.     

BJ Benjamin Janicki October 8, 2019 11:56 AM UTC

Dear Syncfusion,

sorry for the late answer, I had holidays and were not at my Desktop.

My Code is following:

setupOverview will be executed at Startup and after the Details are changed.

it refreshes the total DataGrid.

Edit: The Program is for internal use only. I do not want to sell it.

GG Gowtham Gopalsamy Syncfusion Team October 9, 2019 01:43 PM UTC

Hi Benjamin ,  
Thanks for your patience.  
We have analyzed your code snippet provided through link and we couldn’t able to understand your provided code. Please provide the simple sample because you have used the different type of collection. You are using the datagrid detailsview definition in the provided code and you are set DataSource to the detailsview datagrid. You can use the datasource of the main datagrid to detailsview datagrid based on the underlying data and arrange the column for detailsview in hierarchy by set the GridViewDefinition.RelationalColumn. We have provided the link in below,  
You  have mentioned the after some process and then refresh the datagrid. Let us know where you are refreshing the datatgrid and how you refresh the datagrid.  
 Please provide the simple sample .It will help us to investigate further details and provide the earlier prompt solution.     
Please let us know if you require further other assistance from us.        

BJ Benjamin Janicki October 10, 2019 10:19 AM UTC

Here is a sample.

If you double click on the entry the edit customer Form will open, if you change a value and click on "Änderungen Übernehmen" (Apply Changes) it will not react on Events.

you can simply try it with double click on the entry and then change the contract id to anything you want and apply changes.

I have deleted executables and libraries except of sqlite3 and tools.dll (since tools.dll is my dll for functions I will use in other projects too)

At the moment, only the x64 is working because of a problem of sqlite3.interop.dll error in the 32 bit version.

EDIT: it only applies to the main grid. the subgrids are reacting.

Attachment: WFSnippet_142f0c6.7z

MA Mohanram Anbukkarasu Syncfusion Team October 11, 2019 12:22 PM UTC

Hi Benjamin,   
Thanks for your update. We have checked the provided sample and we are a little bit unclear with your requirement.    
We suspect that your requirement it to update the details in the property grid immediately after updating the values by clicking the Accept Changes button. If yes, you have to refresh the property grid SelectedObject on Accept Changes button click same as you performed in SelectionChanged event.   
If your requirement is to update the details in property grid only after clicking on the corresponding row, there is no need to set SelectedItem property in the CellDoubleClick event. Remove the code to set SelectedItem. So that the SelectionChanged event will be raised and the property grid will update properly.   
Please let us know if we have misunderstood your requirement.   
Mohanram A.   

BJ Benjamin Janicki October 17, 2019 06:19 AM UTC


this helped.

My requirement is met. Oh your DataGrid is not jumping to top after updating. This is great for me. The Default DataGrid in WinForms usually jumps to top so I made the datagrid.SelectedItem = Item. Oh I did not know it is not necassary in your DataGrid :)

Thanks alot for your assistance.

FP Farjana Parveen Ayubb Syncfusion Team October 18, 2019 05:22 AM UTC

Hi Benjamin,  
Thanks for the update. 
We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you. 
Farjana Parveen A 

Live Chat Icon For mobile
Up arrow icon