Welcome to the Xceed Community | Help
Community Search  
More Search Options

Summary Row

Sort Posts: Previous Next
  •  05-11-2006, 10:22 AM Post no. 1879

    Summary Row

    Hello,
    Hopfully I can explain this well.. as I am new to vb.net 2005 and am using the trial version of your product.

    I have a grid, that i have programmed to have a group and I collaspe that groups. First thing I want to do is collaspe all groups except for the top one.
    Then I would like to have a summary row for the records in each group. If possible, have it on the groupedby row. But this is my problem is getting the values to show in the summary. Very simply, can you show me how to do this? Current I see the summary row in my group, when expanded, but the SUM is not there, shows up as #value#. But if you could explain to me how this works, I would feel better about it.
    Thanks,
    Brian
  •  05-12-2006, 2:39 PM Post no. 1880 in reply to 1879

    Re: Summary Row

    For the collapse, collapse the group before fill in the data, then in the GroupAdded handler, uncollapse the first group :

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    Group1.Collapse()

    CustOrdersDetailTableAdapter.Fill(NorthwindDataSet.CustOrdersDetail, 10294)

    End Sub

    Private Sub GridControl1_GroupAdded(ByVal sender As Object, ByVal e As Xceed.Grid.GroupAddedEventArgs) Handles GridControl1.GroupAdded

    If (GridControl1.Groups.Count = 1) Then
    e.Group.Collapsed = False
    End If

    End Sub


    As for the summary row, you can add a SummaryRow to the group, the set the VisibleWhenCollapsed property to true, and it will stay visible all the time. This row is highly configurable, and does all the calculation you set automatically. If you want, you can also use the GroupManagerRow, which display information about the group, and simply modify the TitleFormat property so that it will display what you want.


    André
    Software Developer
    Xceed Software Inc.
  •  05-12-2006, 4:13 PM Post no. 1881 in reply to 1880

    Re: Summary Row

    Great, thanks that did it.
    Question on the summary row... I have this in there now

    Dim mysummaryrow As SummaryRow = New SummaryRow
    mysummaryrow.TextFormat = "Total Coils: %SUM:coils%"
    grpProd_Date.FooterRows.Add(mysummaryrow)
    grpProd_Date.FooterRows.Item(0).VisibleWhenCollapsed = True

    and thats exactly what shows up "Total Coils: %SUM:coils%"
    I was thinking the "coils" would have been the column I wanted to sum up? How do I get the value from that column in that group?
  •  05-15-2006, 4:21 PM Post no. 1882 in reply to 1881

    Re: Summary Row

    You have to make sure that the name of the column you are using is the exact same name as in the Title property of that column. For one thing, it is case sensitive.
    André
    Software Developer
    Xceed Software Inc.
  •  05-15-2006, 5:20 PM Post no. 1883 in reply to 1882

    Re: Summary Row

    dugh... that did it.
    Now that We have that.. I'll have to look at how to do summary cell.. or totals for certain cell in the group.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.