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.
I have a GridGroupingControl that I am currently displaying hierarchial data in. I have multiple Departments with numerous Items under each. I want to be able to right click the grid and copy the whole grid's worth of data so that a user can then paste it into something else, like Excel.
I'm currently using a snippet of code, shown below.
GridRangeInfo range = GridRangeInfo.Cells(1, 2, TableModel.RowCount, TableModel.ColCount); GridRangeInfoList rangeList = new GridRangeInfoList(); rangeList.Add(range); TableModel.GroupingControl.GetTableControl("Store_Order_Details").Model.RowCount, TableModel.GroupingControl.GetTableControl("Store_Order_Details").Model.ColCount); TableModel.CutPaste.CopyTextToClipboard(rangeList);
This works fine when the grid isn't displaying hierarchial data, but as soon as it does, the results from the Copy & Paste only include the Department level data while the Item level data is replaced by spaces.
ADAdministrator Syncfusion Team June 3, 2009 02:47 PM UTC
You would have to recursively loop through each record and its child tables to get at all the data displayed in a hierarchical grid. Attached is a minimal sample that does this.