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

Datasource update issue with gridGrouping grid

Hi, I have two grouping grids that are bound to the same datatable. Both grids have a rowFilter expression set on the same column (called basket), one grid filtering on basket=true and one on basket=false. I want to be able to select N rows from the first grid and change their basket value in order to send them to the other grid. I do this as shown in the code below GridTable gt = gridMain.GetTable("Orders"); if (gt!=null) { foreach (SelectedRecord sr in gt.SelectedRecords) { sr.Record.SetValue("Basket", true); } } Nevertheless this code doesn''t always work - it looks as though if I am only selecting the records, this behaviour works. But if I am editing the record, the value gets changed, hence the records disappear from the first grid but doesn''t always appear in the second one, although the underlying datarow has been changed! In order to see it appearing, I have to click onto another row. I have tried to explicitly call gt.CurrentRecordManager.LeaveRecord(true) in order to leave the current record before modifying the value but it doesn''t fix the problem. I hope you can help - let me know if you want to receive the complete source code; Thanks in advance.

1 Reply

AD Administrator Syncfusion Team March 8, 2005 11:42 PM UTC

Thanks for reporting this problem. When listening to ListChanged events the grouping engine did not check if the current record meets filter criteria. We fixed this now in our source base. As a workaround you could try setting Table.CountersDirty = true and call TableControl.Invalidate, but a version that includes this fix should be out soon. Stefan >Hi, >I have two grouping grids that are bound to the same datatable. Both grids have a rowFilter expression set on the same column (called basket), one grid filtering on basket=true and one on basket=false. I want to be able to select N rows from the first grid and change their basket value in order to send them to the other grid. > >I do this as shown in the code below >GridTable gt = gridMain.GetTable("Orders"); >if (gt!=null) >{ foreach (SelectedRecord sr in gt.SelectedRecords) >{ sr.Record.SetValue("Basket", true); >} >} > >Nevertheless this code doesn''t always work - it looks as though if I am only selecting the records, this behaviour works. But if I am editing the record, the value gets changed, hence the records disappear from the first grid but doesn''t always appear in the second one, although the underlying datarow has been changed! > >In order to see it appearing, I have to click onto another row. > >I have tried to explicitly call gt.CurrentRecordManager.LeaveRecord(true) in order to leave the current record before modifying the value but it doesn''t fix the problem. I hope you can help - let me know if you want to receive the complete source code; >Thanks in advance.

Loader.
Up arrow icon