Questions tagged [dbgrid]

Questions about Delphi visual component DBGrid might have this tag.

236 questions
14
votes
9 answers

Are there any good free/cheap Delphi grid controls?

I gave up on Delphi's DBGrid nearly a decade ago because it is simply no good. Since then, I have used Virtual TreeView which offers a lot of value but it has a few issues. Like the current state of development (e.g. None) and the fact that there is…
Cobus Kruger
  • 7,369
  • 3
  • 56
  • 96
10
votes
1 answer

Delphi TDBGrid How to change selected color when style is gdsGradient

I'm just trying to use delphi XE, before that I've been a big fan of Delphi7. I see the new dbgrid allows to use themed and gradient styles. I'm using gradient and set rowselect, it has a property for gradient-start and -end for the column…
coliv_aja
  • 101
  • 1
  • 4
9
votes
3 answers

Keep the scrollbars hidden in a Delphi dbgrid (even on resize)

For our dbgrid we want the scrollbars to be constantly hidden. Since TDBGrid doesn't have a 'scrollbars' property, we use: ShowScrollBar(DBGrid1.Handle, SB_VERT, False); ShowScrollBar(DBGrid1.Handle, SB_HORZ, False); However when we resize the…
user729103
  • 621
  • 2
  • 10
  • 24
8
votes
6 answers

Adjust Column width DBGrid

I have a TDBGrid. It works, but the columns shown are very large. How can I set an "auto-fix column width"?
ramiromd
  • 1,918
  • 7
  • 29
  • 57
8
votes
3 answers

How to Format a DBGrid Column to Display Two Decimal Places?

I would like to format specific cells to force two decimal places. The data is coming from an ElevateDB stored procedure and hooked into a TDataSource. EDIT: SQL Programming Note: I wasn't sure if this was just an ElevateDB issue or not. Before…
7
votes
3 answers

How to refresh dbgrid without close and open dataset in delphi?

I need to refresh dbgrid constantly, in real time. Close and open dataset works fine, but blink the dbgrid. What can I do to avoid this? I'd like a solution like Ajax, that update only the necessary. Thanks
Daniel Grillo
  • 2,288
  • 4
  • 35
  • 59
7
votes
1 answer

What dataset row appears in the top-most row of DBGrid when RowCount > VisibleRowCount without that first row of the grid being selected?

Is it possible to get the row number that is displayed from the underlying dataset in the top-most row of a DBGrid, without that top-most row being the currently selected row, when the number of records in the underlying dataset is greater than the…
Cary Jensen
  • 3,554
  • 2
  • 29
  • 49
6
votes
2 answers

How do I do a proper owner-draw of Full Row Selected TDBGrid when TDBGrid.DefaultDrawing is false?

When you have a TDBGrid, full row selection, and always show selection, even when not focused, and you want to fully owner-draw it, you have a choice of a deprecated event OnDrawDataCell , and a new event DrawColumnCell, I chose the latter and try…
Warren P
  • 58,696
  • 38
  • 168
  • 301
6
votes
2 answers

How to use checkboxes inside TDBGrid to select multiple records?

How to use checkboxes inside a standard TDBGrid to select multiple records? Or perhaps, do you have any recommendation for a free/open source sister of DBGrid that allows anyone to do that easily? Thank you.
Cocin
  • 153
  • 2
  • 6
6
votes
3 answers

Setting a DBGrid column format in Delphi

I am using a DBGrid component in Delphi. I wonder how I can set the format of a column. I have real values that I want to be displayed as currency in the grid. Someone knows how?
Blue
  • 373
  • 2
  • 7
  • 16
6
votes
2 answers

How to have responsive UI (Form) when performing long-running export task?

Good day people. First off, I'm not an native English speaker I might have some grammar mistakes or such. I need an advice from people who has done something or an application alike mine, well, the thing is that I'm using a TProgressBar in my…
Cycascovar
  • 63
  • 4
5
votes
1 answer

In Delphi, How can I change the color of grid lines in a TDBGrid?

I am using a TDBGrid component in a Delphi application, when I change rows colors the grid lines became unclear or almost invisible. So, can any one show us how to change the color of the grid lines? I mean: how to change the color of cells…
5
votes
3 answers

Refresh DBGrid from another form in delphi

I'm just beginning to learn Delphi and I've a problem. I'd refresh DBGrid from another form. My code: Form1: unit uForm1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DB, ADODB, Grids,…
Pablo
  • 173
  • 3
  • 13
5
votes
4 answers

Delphi - restore actual row in DBGrid

D6 prof. Formerly we used DBISAM and DBISAMTable. That handle the RecNo, and it is working good with modifications (Delete, edit, etc). Now we replaced with ElevateDB, that don't handle RecNo, and many times we use Queries, not Tables. Query must…
durumdara
  • 3,071
  • 4
  • 40
  • 66
5
votes
2 answers

how to color DBGrid special cell?

I have a column which have only "yes" and "no" values. I want if column value is "yes" then only that cell background color is red else "no" then background color is yellow but this code colors whole row : if ADOTable1.FieldByName('Clubs').AsString…
Mamed Aliyev
  • 111
  • 1
  • 2
  • 10
1
2 3
15 16