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

Two grid bound to relation

Hi, I have two grid bound to a data relation like the example in this thread. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=4347 But with v2.0.5.0, if we enable the UseListChangedEvent to true then it doesn''t work anymore. Is it a good idea to enable UseListChangedEvent at all? Thanks, Eddie Tse

10 Replies

AD Administrator Syncfusion Team April 30, 2004 01:20 AM UTC

Another question about the UseListChangedEvent. After upgraded from 1.6.1.8 to 2.0.5.0 the behaviour for GridDataBoundGrid.Binder.SuspendBinding and ResumeBinding is different depending on the value on UseListChangedEvent. When UseListChangedEvent is set to false (the default). After call to Resume binding it doesn''t refresh the grid like it use to do. But when UseListChangedEvent is set to true, it does. However, it breaks the DataRelation behaviour.


AD Administrator Syncfusion Team April 30, 2004 10:49 AM UTC

Try setting the UseListChangedEvent = true only on the Master grid to see if that will work for you. It seems to work OK in the sample you referred to. Setting the propery on all the grids in a master-details setup does seem to break things. You can force a refresh after the ListChangedEvent by setting the this.grid.ForceUpdateAfterListChangedEvent property. (Though you may not need this if you only set the UseListChanged property on teh master grid). If you want to see the advantange of setting UseListChangedEvent = true;, take a look at the Grid\Samples\DataBound\GridPerf. You do not see a great deal of difference on teh initial load. But removing 300 random rows from 20000 records drops from about 12 seconds to less than half a second on modest hardware using this property.


AD Administrator Syncfusion Team April 30, 2004 09:51 PM UTC

Hi Clay, Thanks for the suggestion but I don''t quite understand what do you mean. I am using a GridDataBoundGrid and it doesn''t have the ForceUpdateAfterListChangedEvent property with v2.0.5.0. Also the non refresh behaviour is only when UseListChangedEvent = false. Any other suggestions? Thanks.


AD Administrator Syncfusion Team April 30, 2004 10:04 PM UTC

After calling grid.ResumeBinding, you can force an update by calling grid.Refresh().


AD Administrator Syncfusion Team April 30, 2004 10:49 PM UTC

Thanks for the suggestion Clay. That''s the workaround I was planning to implement. I was looking for a solution that doesn''t require adding an extra call through out the code base.


AD Administrator Syncfusion Team May 4, 2004 09:17 PM UTC

Will the ResumeBinding behaviour change in future patches of the Grid? We don''t want to modify all call after ResumeBinding to call refresh only to find out it is also called again by the Grid hence having Refresh called twice.


AD Administrator Syncfusion Team May 5, 2004 05:01 AM UTC

I do not know what future updates may do for this problem. But in the first update, 2.0.5.1, there is the new property GridDataBoundGrid.ForceUpdateAfterListChangedEvent. So, this *MAY* have an effect. If this update is not available to you by the end of the week, if you send me a sample project showing the problem, I can try it with this property to see if it handles it for you. If not, and you do not want to do a FindInFiles in your code later to change things if it turns out that this issue is addressed in a future release, then I would derive the grid, add a method that wraps the two calls, and then call this new method everywhere. Then you only have to change the code in a single place.


AD Administrator Syncfusion Team May 5, 2004 09:53 AM UTC

Thanks Clay, will wait for 2.0.5.1


AD Administrator Syncfusion Team May 9, 2004 10:07 PM UTC

Hi Clay, Tried 2.0.5.1. We''ve come to the conclusion that we pretty much have to switch on UseListChangedEvent in order for the grid to refresh properly after ResumeBinding. We have other issue that refresh can''t fix, particularly on hier grid. With the master-details problem, will it be fixed soon so that it will work on grid with UseListChangedEvent = true?


AD Administrator Syncfusion Team May 10, 2004 02:14 PM UTC

I don''t know of a definite time frame for this problem to be addressed. It did not make the first patch, 2.0.5.1. We will try to get it in the next one.

Loader.
Live Chat Icon For mobile
Up arrow icon