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. Image for the cookie policy date

Summary Row as the first row.

Hi,
I have taken a look at the summary row sample and do you have any sample that will put a row before or on top of the column headers.
Similar to grouping dragging area.

Thanks

Kwabena


7 Replies

AD Administrator Syncfusion Team December 8, 2006 07:36 AM UTC

Hi Kwabena,
Please refer this sample and let us know if this helps.
GGCSummaryAsTopRow.zip
Thanks for choosing and using Syncfusion Products.
Best Regards,
Jeba.



KB Kwabena Barwuah-Manu December 8, 2006 02:36 PM UTC

Hi Jeba,

Let me explain to what I'm trying so that you can help me.
I have a virtual grid so I do my own grouping and aggregation in my application without using gridgrouping control.
I want to add grid grouping control task bar to my virtual grid so that I can capture the columns being dragged in and out of the grouping bar area.

Thanks

Kwabena


AD Administrator Syncfusion Team December 11, 2006 11:11 AM UTC

Hi Kwabena,

You have a datastore that is used in QueryCellInfo to provide values to the grid, and is used in SaveCellInfo to store any changed values. To have formula cells, the additional work you need to do is to add another datastore that will hold GridFormulaTag objects, one for each cell that should be a FormulaCell. In QueryCellInfo, if e.RowIndex and e.ColIndex point to a formulacell, you get the stored GridFormulatag and set it to e.Style.FormulaTag. In SaveCellInfo, if e.RowIndex and e.ColIndex point to a formulacell, you would store e.Style.FormaulaTag into you datastore (to be used in QueryCellInfo when needed.)

Please refer to the attached sample for implementation.
FormulaInVirtualGrid.zip

Here is a link to a KB that expains how to do something similar so you can use FormulaCells in a GridDataBoundGrid
http://64.78.18.34/Support/article.aspx?id=10439

Best Regards,
Haneef


KB Kwabena Barwuah-Manu December 11, 2006 05:21 PM UTC

Hi Haneef,

I think you send me someone else answered question.

My question was I have a virtual grid and I want to add a row before the column headers.

Thanks

Kwabena


AD Administrator Syncfusion Team December 12, 2006 05:58 AM UTC

Hi Kwabena,

Here is a sample that shows you "How to add the summaryrow at the top of the virtual grid" .It implements the formula cell for the summary calculation. Please refer to the attached sample and let me know if you are looking something different.

VirtualGridSummary.zip

Best Regards,
Haneef


KB Kwabena Barwuah-Manu December 14, 2006 08:20 PM UTC

Hi Haneef,

That's exactly what I am looking for but I can not figure it out in the code sample how you created the row above the column headers.
I want to merge the whole row and attached my custom control.

Thanks you,

Kwabena


AD Administrator Syncfusion Team December 15, 2006 08:49 AM UTC

Hi Kwabena ,

You would have to derive the GridControl and override the OnQueryCellInfo, OnSaveCellInfo and OnRowHeight event to add the Summary row at top of the Grid. Here is a code snippet to show this.

//Create the NewVirtualGrid Summary.
VirtualSummaryGrid gridControl1 = new VirtualSummaryGrid();

//Set the Aggerate Summary for the Column Index = "0" at SummaryRow.
this.gridControl1.SummaryFormulaRow[0] = "=Sum(A3:A12)";
//Set the Aggerate Summary for the Column Index = "1"
this.gridControl1.SummaryFormulaRow[1]= "=Sum(B3:B12)";

Please refer to the attached sample for more details.
VirtualSummaryGrid.zip

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon