张
张剑波
Unregistered / Unconfirmed
GUEST, unregistred user!
ooter and total values.
(1) To show footer row(s) need to set FooterRowCount property.
(2) To force grid to calculate total values need to activate SumList (DBGridEh.SumList.Active := True).
(3) In footer cell, it is possible to show sum value for specified of field, (record count, value of a field or static text). Use property Column.Footer.ValueType. If ValueType = fvtStaticText, then set the property Value. If ValueType = fvtFieldValue, then you need to set property FieldName.
(4) Set ValueType to fvtSum and grid must to show sum value for column field, you can also specify Column.Footer.FieldName to calculate total value for other field.
(5) If you have more then one footer row you can use Column.Footers collection to specify value for individual footer cell in column.
上面的E文看的有些明白,(1)(2)(3)看明白了,(4)(5)不太明白.
字段不知怎么指定.
请举个例子,叫DBGRIDEH下面的合计数能显示就行了.
看了半天DEMO,头都大了。
(1) To show footer row(s) need to set FooterRowCount property.
(2) To force grid to calculate total values need to activate SumList (DBGridEh.SumList.Active := True).
(3) In footer cell, it is possible to show sum value for specified of field, (record count, value of a field or static text). Use property Column.Footer.ValueType. If ValueType = fvtStaticText, then set the property Value. If ValueType = fvtFieldValue, then you need to set property FieldName.
(4) Set ValueType to fvtSum and grid must to show sum value for column field, you can also specify Column.Footer.FieldName to calculate total value for other field.
(5) If you have more then one footer row you can use Column.Footers collection to specify value for individual footer cell in column.
上面的E文看的有些明白,(1)(2)(3)看明白了,(4)(5)不太明白.
字段不知怎么指定.
请举个例子,叫DBGRIDEH下面的合计数能显示就行了.
看了半天DEMO,头都大了。