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''ve one GGC with Parent-Child table relations.
I want to copy multiple selected rows with its child tables and i want to paste those records to the selected row to be copied.Now for single row copying is working for parent table.But for child table if i select 1 row for copy and press Copy buton it''s getting copied but when i press paste button to paste thet row,2 rows are getting pasted.One row is the selected one & the other is from some other parent table.So please give me some solution for this
thanks
Prethi
ADAdministrator Syncfusion Team November 17, 2005 10:29 AM UTC
There is no general support for copy/paste in the GridGroupingControl yet.
Copying and pasting data into a GridGroupingControl with parent-child relations is not straight forward. Here are some of the problems you will have to code through. What happens to primary keys that cannot appear twice in teh same table? What happens when you paste a record into a table with values that do not conform with the parent child constraint?
So, if you want to code this support, you can catch the Copy by subscribing to the Model.ClipboardCopy event for each TableControl in your nested data.
this.gridGroupingControl1.GetTableControl("ParentTable").Model.ClipboardCopy += new GridCutPasteEventHandler(Model_ClipboardCopy);
this.gridGroupingControl1.GetTableControl("ChildTable").Model.ClipboardCopy += new GridCutPasteEventHandler(Model_ClipboardCopy);
this.gridGroupingControl1.GetTableControl("GrandChildTable").Model.ClipboardCopy += new GridCutPasteEventHandler(Model_ClipboardCopy);
There, you can get the Table.SelectedRecords for each of your tables and put them on the Clipboard. To handle the paste, you would do something similar using the Model.ClipboardPaste event. (But you would have to enforce the constraint impose by your datasource at this point).