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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Datasource update issue with gridGrouping grid

Thread ID:

Created:

Updated:

Platform:

Replies:

25824 Mar 8,2005 02:02 PM UTC Mar 8,2005 11:42 PM UTC WinForms 1
loading
Tags: Grouping
Webfrog
Asked On March 8, 2005 02:02 PM UTC

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.

Administrator [Syncfusion]
Replied On 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.

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.

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

;