Home Forums WinForms controls Xceed Grid for WinForms reapplying summaryrow Reply To: reapplying summaryrow

User (Old forums)
Post count: 23064

Thx for the quick reply, however this is not working. Here is my code..

Dim myDataView As DataView = DataSet11.Tables(“customers”).DefaultView
myDataView.RowFilter = “(custid= ‘” & Trim(TextBox1.Text) & “‘) “‘)”
Me.GridControl1.DataSource = myDataView

Me.GridControl1.Columns(“custQTY”).VisibleIndex = 1

Dim sRow As New SummaryRow
Dim group As Group = New Group
group.GroupBy = “custQTY”


CType(srow.Cells(“custQTY”), SummaryCell).StatFunction = Xceed.Grid.StatFunction.Sum


so when i run the form, i get the group and it’s sums in the footer row, but when i drop it down to the table and reapply it back footer rows of the group are not there.
dont know what im doing wrong …Ive tried to add an eventhandler which i found on the forum, and i managed to get a footer row each time the group is applied however row doesnt display sums…this is what i add as eventhandler

Private Sub grid_GroupingUpdated(ByVal sender As Object, ByVal e As EventArgs)
For Each grp As Group In GridControl1.Groups
Dim sumRow As Xceed.Grid.ValueRow = New Xceed.Grid.ValueRow
Dim sum As Double
For Each row As DataRow In grp.GridControl.DataRows
sum += CType(row.Cells(“custQTY”).Value, Double)

‘sum = sumRow.Cells(“custQTY”).Value
sumRow.Cells(“custQtY”).Value = sum

Imported from legacy forums. Posted by fullstop (had 371 views)