Questions tagged [tdbgrid]

TDBGrid is a VCL control used to display and manipulate records from a TDataset in a tabular fashioned way. It is defined in DbGrids.pas unit.

156 questions
1
vote
1 answer

How to create a OnCellDblClick for Delphi's TDBGrid

I'm a newbie when it comes to creating new events to components... and I noticed that TDBGrid has a OnCellClick, but sadly it doesnt have an OnCellDblClick event and it bothers me a lot the fact that if I double click anywhere in my grid the…
1
vote
0 answers

TDBGrid not saving TColumn.Width property after Visible := false

When saving a form with a TDBGrid having a column with Visible = false, the column's Width property is not saved, and the original value of the Width property is lost. The context is a TColumn in a standard VCL TDBGrid control on a form (Delphi…
Reversed Engineer
  • 1,095
  • 13
  • 26
1
vote
1 answer

How to add a column to a DBGrid by code?

Using a TDBGrid, I want to add a new column and set its name by code. How to do this at runtime?
Johnny
  • 57
  • 3
  • 8
1
vote
4 answers

TDBGrid onSelect

I would like to customize TDBGrid: 1) add onSelect/onUnselect events - e.g. good for show count of selected items. 2) remove select item on left mouse click. I have inherited TDBGrid and rewritten MouseDown, but then it is not possible to move or…
yippee
1
vote
1 answer

DBGrid, dbf merging 2 same rows

I'm using DBGrid, dbf and DataSource just figured how to make so when removing a certain book only the ammount removes by 1. I have been stuck on a task to make 2 rows merge if theyre made identical for example if the books name is "Test" and i'd…
Deivids
  • 45
  • 1
  • 5
1
vote
1 answer

Retrieving the values of a specific column in a TDBGrid

I have a TDBGRID called Grid in my application with 3 columns: EMP_ID EMP_FirstName EMP_LastName My grid is multiselect. How can I get the EMP_ID of the selected rows when the user clicks a button (I want to pass them to a stored procedure).
1
vote
0 answers

change colors of some rows in dbgrid delphi 5

I have a problem, I have an TStringList object with some numbers and his status in some kind of json text I created, like: {'8987436','Sin documentar.', '0','1'}, {...},... This file can contain a lot of groups of data. This works really fine, this…
1
vote
2 answers

Get Column Object for DataSet Field

Let's say, I have a set of TField objects and want to change their visibility in some DBGrid dynamically. I also want to allow users to change column order in this DBGrid, and have some fixed columns. I know proper way to hide/show columns on…
Danatela
  • 349
  • 8
  • 28
1
vote
0 answers

Class TrueOleDBGrid80.TDBGrid of control DBGrid1 was not a loaded control class

I have an existing vb project that uses True DBGrid. I opened the source file in a Win7 PC, and I installed True dbGrid 8.0 Pro. Now, the error comes out: Class TrueOleDBGrid80.TDBGrid of control DBGrid1 was not a loaded control class. Is there any…
broy22
  • 37
  • 5
1
vote
1 answer

Delphi double click DBGrid to find field contents of row

I'm wondering how I can select the specific WebID value in my DBGrid for the record which is double clicked? For example if they clicked anywhere in the row of WebID 2, I have a variable to store the number 2. I have a SQLQuery, then a…
Toby Fox
  • 105
  • 4
  • 11
1
vote
0 answers

Finger scrolling a TDBGrid in Delphi

I'm trying to make a VCL app more touch friendly and have been trying to get a DBGrid to scroll like an Android or iOS grid/list. By default it works if you do a double flick - with inertia and everything, but would like it to scroll with a single…
Alister
  • 6,527
  • 4
  • 46
  • 70
1
vote
0 answers

DBGrid row selection changes when deleting a record in Delphi

I've noticed that when you have multi-select on in a TDBGrid, have a number of rows selected and delete a record, the record is deleted just fine, but your selection changes below the deleted record. All the rows move up one, but the selection…
Alister
  • 6,527
  • 4
  • 46
  • 70
1
vote
1 answer

How do I add row programatically in TDBGrid in Delphi

I want to add some data in grid to show user. I want to use TDBGrid How do I add any row to grid without a database? Thank you
VOLVO
  • 541
  • 5
  • 16
1
vote
1 answer

hyperlink field in DBGRID

I'm doing a small internal software to search branch lines in my company. In addition to the branch lines I also put an e-mail field in the database as shown below: My intention is to click on the registered e-mail and the software via the…
Daniel Grillo
  • 2,368
  • 4
  • 37
  • 62
1
vote
3 answers

Adding a checkbox in a grid whose OnDrawColumnCell handler is generic

Following on from this question and its very useful answer: I implemented a variation of Ken's answer in my big project where I had similar code appearing in many forms. But I noticed that I also had some forms with DrawColumnCell handlers as…
No'am Newman
  • 6,395
  • 5
  • 38
  • 50