Editable GridViewSummaryItem

6 posts, 0 answers
  1. Emmanuel Dugas-Gallant
    Emmanuel Dugas-Gallant avatar
    8 posts
    Member since:
    Mar 2010

    Posted 27 Jun 2011 Link to this post

    Is there a way to create an override of the GridViewSummaryItem to get an editable summary item with an OnPropertyChanged event?
  2. Alexander
    Admin
    Alexander avatar
    306 posts

    Posted 30 Jun 2011 Link to this post

    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!
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Emmanuel Dugas-Gallant
    Emmanuel Dugas-Gallant avatar
    8 posts
    Member since:
    Mar 2010

    Posted 30 Jun 2011 Link to this post

    Actually, this code does not allow me to edit the cell in the SummaryRow.

  5. Alexander
    Admin
    Alexander avatar
    306 posts

    Posted 05 Jul 2011 Link to this post

    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!
  6. Emmanuel Dugas-Gallant
    Emmanuel Dugas-Gallant avatar
    8 posts
    Member since:
    Mar 2010

    Posted 05 Jul 2011 Link to this post

    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,
  7. Alexander
    Admin
    Alexander avatar
    306 posts

    Posted 08 Jul 2011 Link to this post

    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!

Back to Top
UI for WinForms is Visual Studio 2017 Ready