misc Posted October 24, 2014 Posted October 24, 2014 Hi, i try to display the total record count of the current fetch from my unidbgrid. I display the grid with the weboptions and pagingEnabled=TRUE. I'd like to show the record count at the same location like the paging controls. Is that possible? Thanks
Sherzod Posted October 24, 2014 Posted October 24, 2014 Hi Michael Schindler! If I understand correctly, try: UniDBGrid1 -> .... function pagingBar.beforeInit(sender, config) { sender.displayMsg = 'Total rows {2}';// defaultvalue = 'Displaying {0} - {1} of {2} sender.displayInfo = true; } Best regards. 1
misc Posted October 24, 2014 Author Posted October 24, 2014 Hi Delphi Developer, something in this direction, i dont want to show a message that tells you how many records i have. On the paging bar, i want to display the record count. Can i access this component somehow? Thank you
Fateh Bouchair Posted May 11, 2018 Posted May 11, 2018 procedure UniDBGrid1ColumnSummary(Column: TUniDBGridColumn; GroupFieldValue: Variant); begin if Column.FieldName <> 'Your field to display count' then begin if Column.AuxValue = NULL then Column.AuxValue:=0.00; Column.AuxValue := Column.AuxValue + (Column.Field.AsFloat) end end; procedure UniDBGrid1ColumnSummaryResult(Column: TUniDBGridColumn; GroupFieldValue: Variant; Attribs: TUniCellAttribs; var Result: string); var I : Integer; F : Real; begin if SameText(Column.FieldName, 'Your field to display count') then begin I := UniMainModule.your dataset.RecordCount; Result := IntToStr(I); Attribs.Font.Style:=[fsBold]; Attribs.Font.Color:=clGreen; end else begin F := Column.AuxValue; Result := FormatFloat('#,0.00 ', F); Attribs.Font.Style:=[fsBold]; Attribs.Font.Color:=clNavy; Column.AuxValue:=NULL; end; end;
Recommended Posts