Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #14474 |

    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

    Imported from legacy forums. Posted by Brian (had 4184 views)

    User (Old forums)
    Member
    Post count: 23064

    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.

    Imported from legacy forums. Posted by André (had 546 views)

    User (Old forums)
    Member
    Post count: 23064

    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?

    Imported from legacy forums. Posted by Brian (had 522 views)

    User (Old forums)
    Member
    Post count: 23064

    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.

    Imported from legacy forums. Posted by André (had 431 views)

    User (Old forums)
    Member
    Post count: 23064

    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.

    Imported from legacy forums. Posted by Brian (had 4771 views)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.