Emmanuel Dugas-Gallant
Top achievements
Rank 1
Emmanuel Dugas-Gallant
asked on 27 Jun 2011, 07:43 PM
Is there a way to create an override of the GridViewSummaryItem to get an editable summary item with an OnPropertyChanged event?
5 Answers, 1 is accepted
0
Hello Emmanuel,
Thank you for your question.
You can inherit GridViewSummaryItem and override its OnPropertyChanged method, Evaluate method and its virtual properties. The following code snippet demonstrates how to create and use a custom summary item:
I hope it helps.
Best regards,
Alexander
the Telerik team
Thank you for your question.
You can inherit GridViewSummaryItem and override its OnPropertyChanged method, Evaluate method and its virtual properties. The following code snippet demonstrates how to create and use a custom summary item:
public
class
CustomSummaryItem : GridViewSummaryItem
{
public
CustomSummaryItem(
string
name,
string
formatString, GridAggregateFunction aggregate)
:
base
(name, formatString, aggregate)
{
}
protected
override
void
OnPropertyChanged(PropertyChangedEventArgs e)
{
base
.OnPropertyChanged(e);
}
public
override
object
Evaluate(IHierarchicalRow row)
{
return
base
.Evaluate(row);
}
}
CustomSummaryItem summaryItem =
new
CustomSummaryItem(
"ID"
,
"{0}"
, GridAggregateFunction.Count);
GridViewSummaryRowItem summaryRowItem =
new
GridViewSummaryRowItem();
summaryRowItem.Add(summaryItem);
this
.radGridView1.SummaryRowsTop.Add(summaryRowItem);
I hope it helps.
Best regards,
Alexander
the Telerik team
Registration for Q2 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting July 18th and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Emmanuel Dugas-Gallant
Top achievements
Rank 1
answered on 30 Jun 2011, 04:42 PM
Actually, this code does not allow me to edit the cell in the SummaryRow.
0
Hello Emmanuel,
Could you please give us more details regarding the scenario you are trying to achieve? It will let us try to find a suitable solution for it.
I am looking forward to your reply.
Best regards,
Alexander
the Telerik team
Could you please give us more details regarding the scenario you are trying to achieve? It will let us try to find a suitable solution for it.
I am looking forward to your reply.
Best regards,
Alexander
the Telerik team
Registration for Q2 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting July 18th and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Emmanuel Dugas-Gallant
Top achievements
Rank 1
answered on 05 Jul 2011, 01:28 PM
Hi here is a screenshot of what I'm trying to do. In the summary rows, I would like to be able to have an editable cell (check the orange rectangle below the Final Gross Margin). Is this possible?
Thanks,
Thanks,
0
Hello Emmanuel,
The current architecture of RadGridView does not allow adding editable cells in a summary row. We will consider adding this feature if more clients request it.
Best regards,
Alexander
the Telerik team
The current architecture of RadGridView does not allow adding editable cells in a summary row. We will consider adding this feature if more clients request it.
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!