Questions tagged [tstringgrid]

TStringGrid is VCL grid control designed to manage the handling of strings and associated objects in Delphi and related development tools. It is defined in the Grids.pas (or VCL.Grids.pas starting with Delphi XE2 version) unit.

The exact amount of features vary depending upon chosed devtool and its version.

Some documentation links include^

181 questions
0
votes
1 answer

Retrieve values from database to StringGrid

In connection with my previous question I've successfully save string values in StringGrid to my database in one column. Now I want to retrieved the values from database and put it back from StringGrid. This is what I've tried : procedure…
NewbieKid
  • 87
  • 7
0
votes
1 answer

Alternet raw color in StringGrid in C++ Builder XE

I want to use string grid in my C++ Builder XE Program in two alternate color of white & sky blue. I want to make odd raw white & even raw sky blue so please tell me how can i do it. Please help me to do so in C++ Builder XE
rudasagani
  • 157
  • 2
  • 12
0
votes
1 answer

Delphi: load file into TStringGrid

There is a program that creates a log file. This is an example of the log file it creates: This program loads this log file into a TStringGrid. The log file is tab delimited. A cell can has a space " ". How can I use TStringGrid or an alternative…
maxfax
  • 4,281
  • 12
  • 74
  • 120
0
votes
1 answer

Add checkbox in stringgrid Delphi FMX

for an app, I have a stringgrid with objects. now it is the intention that the objects are selected in the string grid by means of the checkbox. so for every row, there must be a column with a checkbox. what is the best way for this on an FMX…
user14918445
0
votes
1 answer

problem with a code for string grid ( align center )

Delphi: How to make cells' texts in TStringGrid center aligned? When I use the top code (OnDraw part), it doesn't delete the first text and write the new text on the old text and one sel will duplicate .
Arash
  • 61
  • 1
  • 2
  • 9
0
votes
1 answer

Alternative(s) for TStringGrid for Delphi Prism

Since I am starting to develop under Delphi Prism, I noticed it doesn't have any grid tool similar to TStringGrid tool that you normally see in Delphi 7 and below. Although Delphi Prism has a DataGridView, it doesn't easily lend itself for my…
ThN
  • 3,235
  • 3
  • 57
  • 115
0
votes
0 answers

Adding all buttons captions automatically to string grid

I am new to Delphi. I would like to know, is there any way to add any Caption or Text inserted/created by the user in a Form to a StringGrid automatically? For example, using for a simple translator VCL, the Form detects a Button added and the…
maxfido
  • 45
  • 5
0
votes
1 answer

Disable mouse scroll wheel for TStringGrid components, enable for outer frame (VCL, C++ Builder)

I have several TStringGrid components in a frame. I would like to disable the mouse scroll wheel for a TStringGrid component, but enable it for the frame, so that when the mouse wheel is moved, the frame scrolls up or down, instead of changing the…
rebecca
  • 113
  • 7
0
votes
1 answer

How show horizontal scrollbar automatically? (C++ Builder, VCL)

I have several StringGrid components in the same frame. All grids have the same headings. I would like to have the horizontal scrollbar of the frame show up automatically if the window is more narrow than the width of the StringGrid. The vertical…
rebecca
  • 113
  • 7
0
votes
0 answers

Thin line at left of cells in selected row in tstringgrid which is different color than

I have a tstringgrid on a form which uses this code to highlight a selected row: procedure TTestForm.testGridDrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); begin testGrid.Canvas.Pen.Color := clNone; if…
0
votes
1 answer

Delphi Compiler expect [ on index of call of TStringsGrid cols(TStrings) property

Dear Stack overflow Community I just resently started to learn delphi. I tried to get the Index of a Colum in a TString Grid over the display name. For that i tried to call the indexof method on the cols property of the grid but the Compiler…
as asdad
  • 3
  • 2
0
votes
1 answer

How to refresh data in StringGrid when sorting DB using ADOTable.Sort

I have a TStringGrid in a Firemonkey app for Windows which I have used LiveBindings to connect to a DataSource. The DataSource is linked to an ADOTable. When I use ADOTable.sort the data in the Grid seems to only sort the first row and not the…
0
votes
0 answers

How to get rid of blue color when a row is selected in TStringGrid?

I am trying to learn drawing a StringGrid in Delphi. Here is my StringGrid: But the problem is when I select a row blue areas appear like shown in the image even I did not set color to blue. I want to make selected row fully orange and get rid of…
user10825637
0
votes
1 answer

Percentage mask on some cells of the TStringGrid

I have a TStringGrid where I will type in each column a value and I need a mask for the value to appear as a percentage, I am a beginner with Delphi but I saw that there is an OnGetEditMask method but I do not know how to create a mask for the…
Manzini
  • 1,671
  • 2
  • 9
  • 15
0
votes
1 answer

Delphi 7 - Changing font sub-property is not updating component

I'm having problems in design time with a StringGrid I've made. When a property called "Header" is changed, the Invalidate method works fine and the Grid is repainted in design-time. However, when a sub-property Font is added, the Grid does not…
Felipe Morais
  • 155
  • 2
  • 12