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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GroupSummaryRow in VB.NET examples

Thread ID:

Created:

Updated:

Platform:

Replies:

124781 Jun 29,2016 02:48 PM UTC Jun 30,2016 02:58 PM UTC Silverlight 1
loading
Tags: SfDataGrid
mohd
Asked On June 29, 2016 02:48 PM UTC

Hi
While trying your sfDataGrid, I was trying to programmatically group and create summeries for my sfDataGrid. The examples I found are all C# and XAML. I am using VB.NET and I find it hard to translate it. Can any one show me how to do this in VB.NET ??
Here's what I've found in C#:
this.dataGrid.GroupSummaryRows.Add(new GridSummaryRow()
{
    ShowSummaryInRow = false,    
    SummaryColumns = new ObservableCollection<ISummaryColumn>()
    {
        new GridSummaryColumn()
        { 
            Name = "PriceAmount", 
            MappingName="UnitPrice", 
            SummaryType= SummaryType.Int32Aggregate, 
            Format="Amount - {Sum:c}"
        }, 
        new GridSummaryColumn()
        {
            Name="ProductCount",
            MappingName="ProductName",
            SummaryType=SummaryType.CountAggregate,
            Format="Count - {Count:d}"
        },
    }
});

any help please??
Best



Jai Ganesh S [Syncfusion]
Replied On June 30, 2016 02:58 PM UTC

Hi mohd, 
 
You can achieve your requirement to programatically add the group summaries in VB.NET like below, 
 
Me.dataGrid.GroupSummaryRows.Add(New GridSummaryRow() With { 
     .ShowSummaryInRow = False, _ 
    .SummaryColumns = New ObservableCollection(Of ISummaryColumn)() From { 
        New GridSummaryColumn() With { 
             .Name = "Age", 
             .MappingName = "EmployeeAge", 
             .SummaryType = SummaryType.Int32Aggregate, 
             .Format = "Count - {Count:d}" 
        }, 
        New GridSummaryColumn() With { 
            .Name = "Salary", 
            .MappingName = "EmployeeSalary", 
            .SummaryType = SummaryType.CountAggregate, 
            .Format = "Amount - {Sum:c}" 
        } 
    } 
}) 
 
 
Regards, 
Jai Ganesh S 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;