This is a migrated thread and some comments may be shown as answers.

Summary item empty

1 Answer 38 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Nadine
Top achievements
Rank 1
Nadine asked on 17 Jul 2011, 04:22 PM
Hi,

I was testing the summary row to see if it could be useful for me.

So I set up a simple COUNT expression test. Desperately the summary item is always empty.

Maybe I missed some main information in the documentation? Do I have to do some additional work for this in an event or something else? Or maybe I'm using it in the wrong event? I also tested with some AggregateEXprssions, but the result was the same. I see the row, but it is empty. The result was also the same when I used the code where I'm initializing the grid's content.

My code is like this:

private

 

void rGrid_DataBindingComplete(object sender, GridViewBindingCompleteEventArgs e)

 

{

    ...

GridViewSummaryItem

 

summaryItem = new GridViewSummaryItem();

 

summaryItem.Name =

"name_Guid";

 

summaryItem.Aggregate =

GridAggregateFunction.Count;

 

 

 

GridViewSummaryRowItem summaryRowItem = new GridViewSummaryRowItem();

 

summaryRowItem.Add(summaryItem);

 

this.rGrid.SummaryRowsTop.Add(summaryRowItem);

 


}

Thanx

Nadine

1 Answer, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 20 Jul 2011, 05:10 PM
Hello Nadine,

Your code is correct and should calculate and display your summary correctly as long as your RadGridView control has a column with the Name 'name_Guid'. The event you use to create your summary row is not particularly important - you can create it in any convenient part of your code, even using the RadGridView designer.

If you still continue to experience difficulties to create your summary row, please give us more details regarding your scenario. It will help us find suitable approach for your case.

Best regards,
Alexander
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
GridView
Asked by
Nadine
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Share this question
or