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
close icon

edit - sort problem in 4.1.09 beta for NET 2.0

Hello, I use the GridDataboundGrid. When I edit a cell in an unsorted column all works fine. If I edit a cell in a sorted column and the new value causes resorting the new value will be duplicated in 2 rows (real row and position where row was previously sorted in) Any idea?

10 Replies

ST stanleyj Syncfusion Team January 5, 2006 12:34 PM UTC

Hi Uwe, Using VS2005 RTM, the problem in not seen. Are you using the same? Best regards, Stanley


UW Uwe Wittig January 5, 2006 04:12 PM UTC

Hi Stanley, I use 8.0.50727.42 RTM. I will wait for the final SyncFusion 4.1 version to test it again. If it doesn''t work then, I will post a simple example. Thanks, Uwe >Hi Uwe, > >Using VS2005 RTM, the problem in not seen. Are you using the same? > >Best regards, >Stanley


AD Administrator Syncfusion Team June 8, 2006 09:55 PM UTC

I''m seeing this behaviour in the latest 4.2 libraries. >Hi Stanley, > >I use 8.0.50727.42 RTM. >I will wait for the final SyncFusion 4.1 version to test it again. If it doesn''t work then, I will post a simple example. > >Thanks, >Uwe > >>Hi Uwe, >> >>Using VS2005 RTM, the problem in not seen. Are you using the same? >> >>Best regards, >>Stanley


AD Administrator Syncfusion Team June 9, 2006 04:01 AM UTC

Hi Mark, Setting the UseListChangedEvent property to true will avoid the mentioned issue. this.gridDataBoundGrid1.UseListChangedEvent = true; Regards, Calvin.


MA Mark Atkinson June 12, 2006 06:44 PM UTC

I''m still seeing the same issue. I should mention that my underlying DataView has the Sort value. Occasionally when I edit a field (where that field has the sort) and then click in the cell to the immediate right I get a message box that reads "Do not move the current position with this method" >Hi Mark, > >Setting the UseListChangedEvent property to true will avoid the mentioned issue. > >this.gridDataBoundGrid1.UseListChangedEvent = true; > >Regards, >Calvin.


AD Administrator Syncfusion Team June 13, 2006 03:16 PM UTC

Hi Mark, I am not able to reproduce the issue. Attached is a sample that works fine with a Sort value in the DataView. Can you please reproduce the issue in the attached sample and send it back so that we can get back with the solution at the earliest? Thanks, Calvin.

Sample01.zip


MA Mark Atkinson June 13, 2006 04:51 PM UTC

Thanks Calvin, I wasn''t able to reproduce the issue in the sample you gave me either but I have a better understanding of what was happening. In my grid I was doing some extra handling of the CurrentCellValidated event and, in that method, getting a hold of the underlying DataRowView and calling that object''s EndEdit method. This had the benefit of updating other controls with the new value (and some other things related to my application) but obviously has some adverse side effects when the bound DataView is sorted. Still, it would be nice to be able to EndEdit on the current cell so that, at that point (leaving the cell by clicking or tabbing into an adjacent cell) it''s possible to do some further manipulation on the updated DataView. I''ll look into what other events I might be able to tap into. If you have any thoughts or ideas, I''d love to hear them. Thanks, as always, for the response and excellent technical support. Being able to download samples and communicate like this is fantastic. Mark >Hi Mark, > >I am not able to reproduce the issue. Attached is a sample that works fine with a Sort value in the DataView. Can you please reproduce the issue in the attached sample and send it back so that we can get back with the solution at the earliest? > >Thanks, >Calvin. >

Sample01.zip


MA Mark Atkinson June 13, 2006 05:15 PM UTC

Calvin, Adding the method below to your sample will reproduce the issue. Just need to edit one of the sorted cells. void gridDataBoundGrid1_CurrentCellValidated (object sender, EventArgs e) { CurrencyManager cm = BindingContext[gridDataBoundGrid1.DataSource, gridDataBoundGrid1.DataMember] as CurrencyManager; DataView dv = cm.List as DataView; DataRowView drv = cm.Current as DataRowView; drv.EndEdit (); } >Hi Mark, > >I am not able to reproduce the issue. Attached is a sample that works fine with a Sort value in the DataView. Can you please reproduce the issue in the attached sample and send it back so that we can get back with the solution at the earliest? > >Thanks, >Calvin. >

Sample01.zip


AD Administrator Syncfusion Team June 14, 2006 10:28 AM UTC

Hi Mark, Try calling the this.gridDataBoundGrid1.Binder.EndEdit(); in the gridDataBoundGrid1.CurrentCellValidated event handler instead of calling the drv.EndEdit(), which will also update the underlying data source when a cell value is changed with out throwing any exception. Let us know if this helps. Regards, Calvin.


AD Administrator Syncfusion Team June 14, 2006 10:32 AM UTC

Hi Mark, Try calling the this.gridDataBoundGrid1.Binder.EndEdit(); in the gridDataBoundGrid1.CurrentCellAcceptedChanges event handler. Regards, Calvin.

Loader.
Live Chat Icon For mobile
Up arrow icon