Link to home
Start Free TrialLog in
Avatar of srikanthreddyn143
srikanthreddyn143

asked on

Changing summary value for UltraWinGrid

I am using ultrawingrid which summary enabled showing the sum of the column. Now I want to make the summary value to zero and it should show only tthe sum of those rows which i select using check box.
ASKER CERTIFIED SOLUTION
Avatar of ZeonFlash
ZeonFlash

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of srikanthreddyn143
srikanthreddyn143

ASKER

Hi Zeon,

Thanks for your reply.It was throwing an exception "Cannot convert 'True' to Long" when i used code in this way.

 'Perform the summary 
    Private Sub AggregateCustomSummary(ByVal summarySettings As SummarySettings, ByVal row As UltraGridRow) Implements ICustomSummaryCalculator.AggregateCustomSummary
        Try
            If Not row.Cells("CB").Value.ToString Then
                Exit Sub
            Else
                decTotal += Convert.ToDecimal(row.Cells("Amount").Value)
            End If
        Catch ex As Exception
            ExceptionManager.Publish(ex)
        End Try
    End Sub

Open in new window

It was throwing exception At line "If Not row.Cells("CB").Value"
Thanks.
Its working fine when i kept "If Not row.Cells("CB").Value = "True" Then ". But how can I have the summary as a footer. Right now it is scrolling with the datagrid.
Thank you. Thats fine.