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.
Unfortunately, activation email could not send to your email. Please try again.

How to copy the Grid withe Nested Tables

Thread ID:

Created:

Updated:

Platform:

Replies:

60811 May 11,2007 02:53 PM May 11,2007 06:44 PM Windows Forms 1
loading
Tags: Grouping
sri
Asked On May 11, 2007 02:53 PM

Hi,

I am trying to copy the Grid that has NestedTables to Excel. For some reason, the Copied grid on Excel showing blank rows in for child table data. Please see below for code that I am using to copy and paste. Please help me with this issue.

private void CopyGrid_Click(object sender, System.EventArgs e)
{
GridRangeInfoList rangeList = new GridRangeInfoList();

for (int i = 0; i < this.ggFcstExcps.Table.DisplayElements.Count; i++)
{
Element el = this.ggFcstExcps.Table.DisplayElements[i];

if (el.Kind == DisplayElementKind.NestedTable)
{
NestedTable nt = (NestedTable)el;

foreach (Element chEl in nt.ChildTable.NestedDisplayElements)
{
Record r = chEl.GetRecord();

GridRangeInfo range = GridRangeInfo.Rows(i, nt.ChildTable.NestedDisplayElements.Count);
rangeList.Add(range);

Console.WriteLine(chEl.Info);

}
i += (nt.ChildTable.NestedDisplayElements.Count - 1);
}
else
{
//GridRangeInfo range = GridRangeInfo.Cells(i, 0, i, this.ggFcstExcps.TableModel.ColCount);
GridRangeInfo range = GridRangeInfo.Row(i);
rangeList.Add(range);

Console.WriteLine(el.Info);

}

}

this.ggFcstExcps.TableModel.CutPaste.CopyTextToClipboard(rangeList);

}

haneefm [Syncfusion]
Replied On May 11, 2007 06:44 PM

Hi Sri,

Here is a forum thread that discuss with the simillar issue.
http://www.syncfusion.com/support/forums/message.aspx?&MessageID=37186

Best regards,
Haneef

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.

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.

;