Search code examples
vb.netwinformstelerik

Hide GridViewSummaryRowItem from radgridview vb.net winform


i have calculated sum of totals in radgridview and show the value in text box.which is done successfully .

    Dim summaryItem As New GridViewSummaryItem()
    summaryItem.Name = "ItemTotal"
    summaryItem.Aggregate = GridAggregateFunction.Sum

    Dim summaryRowItem As New GridViewSummaryRowItem()
    summaryRowItem.Add(summaryItem)
    RGV_SaleTransection.SummaryRowsBottom.Add(summaryRowItem)

    Private Sub RGV_SaleTransection_GroupSummaryEvaluate(sender As Object, e As  GroupSummaryEvaluationEventArgs) Handles RGV_SaleTransection.GroupSummaryEvaluate
    RTxt_SubTotal.Text = e.Value
    end sub

now i want to hide this summary row from grid.can anyone help any other way will equally be appreciated.


Solution

  • Monisa,

    You can hide the summary rows by using the following code snippet:

            For Each summaryRow As GridViewSummaryRowInfo In Me.RadGridView1.MasterView.SummaryRows
            summaryRow.MaxHeight = 1
        Next
    

    I hope that it suits your scenario.