Hi Liquidnitrogen,
The following is the sample demonstrates the technique to copy the filter grouprecord contents (Cntrl + C) when the user click on the GroupRowHeader and copy it the Clipboard. This data can be pasted to Excel by using (Cntrl + V) command.
This has been achieved by handling the TableControlCellClick event. In the event, the user defiend method is triggered and accordingly contents will be copied. Below is a code snippet.
private void CopyGroupRecords(Element element)
{
string s = "";
Group group = element.ParentGroup;
foreach (Record rec in group.FilteredRecords)
{
GridTableDescriptor td = group.ParentTableDescriptor as GridTableDescriptor;
for (int i = 0; i < td.VisibleColumns.Count; ++i)
{
GridVisibleColumnDescriptor vcd = td.VisibleColumns[i];
if (i != 0)
s += '\t';
s += rec.GetValue(vcd.Name).ToString();
}
s += Environment.NewLine;
}
Clipboard.SetDataObject(new DataObject(s), true);
}
Here is a sample for you reference.
GGC_CopyFilterRecordSample2005.zipBest regards,
Haneef