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: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:

Created:

Updated:

Platform:

Replies:

148027 Oct 2,2019 02:45 PM UTC Oct 18,2019 05:22 AM UTC WinForms 7
loading
Tags: SfDataGrid
Benjamin Janicki
Asked On October 2, 2019 02:45 PM UTC

Hallo,

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?

Thanks

Gowtham Gopalsamy [Syncfusion]
Replied On 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.     
   
Regards,
Gowtham 
   


Benjamin Janicki
Replied On 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:
https://dpaste.de/AvWz

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.

Gowtham Gopalsamy [Syncfusion]
Replied On 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.        
 
Regards,  
Gowtham  


Benjamin Janicki
Replied On 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

Mohanram Anbukkarasu [Syncfusion]
Replied On 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.   
  
Regards,   
Mohanram A.   


Benjamin Janicki
Replied On October 17, 2019 06:19 AM UTC

Thanks,

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.

Farjana Parveen Ayubb [Syncfusion]
Replied On 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. 
 
Regards, 
Farjana Parveen A 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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

Live Chat Icon For mobile
Live Chat Icon