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

Editable GridViewSummaryItem

5 Answers 55 Views
GridView
This is a migrated thread and some comments may be shown as answers.
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

Sort by
0
Alexander
Telerik team
answered on 30 Jun 2011, 01:12 PM
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:
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
Alexander
Telerik team
answered on 05 Jul 2011, 08:31 AM
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
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,
0
Alexander
Telerik team
answered on 08 Jul 2011, 11:00 AM
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

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
Emmanuel Dugas-Gallant
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Emmanuel Dugas-Gallant
Top achievements
Rank 1
Share this question
or