Is ther a way to use this code:
GridCaptionRow gcr = e.TableCellIdentity.DisplayElement as GridCaptionRow;
GridCaptionSection gcs = gcr.ParentSection as GridCaptionSection;
string s = string.Empty; //.Format(e.TableCellIdentity.GroupedColumn.GetName());
// s += string.Format("nItems: {0}, ", gcs.ParentGroup.GetChildCount());
Record r = gcs.ParentGroup.GetFirstRecord();
r = gcs.ParentGroup.Records[1];
s += r.GetValue("Trading Dept") + ", "; //column name...
s += r.GetValue("Trading Group") + ", "; //column name...
e.Style.Text = s;
and have the cloumn data display in seperate columns?
If you use
e.Style.Text = e.TableCellIdentity.ColIndex.ToString();
the index show for the corrisponding column. Is this possible with the data as well?
Thanks
Hu Anderson
>You can make the caption have cells by setting some properties to draw empty Caption Summary cells. Then you can provide the values for these cells in QueryCellStyleInfo.
>
>GridSummaryRowDescriptor summaryRow1 = new GridSummaryRowDescriptor();
>summaryRow1.Name = "Caption";
>summaryRow1.Visible = false;
>this.gridGroupingControl1.TableDescriptor.SummaryRows.Add(summaryRow1);
>this.gridGroupingControl1.TopLevelGroupOptions.CaptionSummaryRow = "Caption";
>this.gridGroupingControl1.QueryCellStyleInfo += new GridTableCellStyleInfoEventHandler(gridGroupingControl1_QueryCellStyleInfo);
>
>
>
>private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
>{
> if(e.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionSummaryCell)
> {
> e.Style.Text = e.TableCellIdentity.ColIndex.ToString();
> }
>}
>
>
>Here is a little sample.
>
>http://www.syncfusion.com/Support/user/uploads/GGC_ExcelCopy_335bd462.zip
>
>