The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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.
ADAdministrator 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.