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
1
vote
1 answer

How do you set up a click event on a TStringGrid column header (fixed) so visually it looks like you are pressing a button

I am working with Lazarus v0.9.30. I have a TForm with a TStringGrid on it. I have a fixed row in the grid, which is where I have all of my column headers. Each column is a TGridColumn object and each column title is a TGridColumnTitleObject. When…
user1174918
  • 525
  • 6
  • 22
1
vote
2 answers

Fixing an error in a method declaration in a form in Delphi

Why am I getting this error, I replaced a stringgrid with a listview, I then set it to viewstyle vsreport but I am getting an error like (expected '=' but '(' found) its flashing on this procedure below procedure TForm2.ListView2DblClick(Sender:…
Mildred Shimz
  • 607
  • 4
  • 11
  • 20
1
vote
1 answer

How to read TStringGrid values and assign them to TEdits

I am trying to implement a way to select a person's name from a TStringGrid that has values in two rows with two columns. These rows represent names of people and their respective ages. Once a name is selected by clicking on it, I want to fill two…
Marcell
  • 91
  • 1
  • 1
  • 8
1
vote
1 answer

Is it possible to catch some event after OnDrawCell? I would like to draw texts on a cells

I would like to draw nice texts on a stripes after all drawing on TStringGrid is done. Problem is I don't know when I can draw them. Is there any envent that occurs after OnDrawCell, when whole grid is drown?
Jacek U
  • 53
  • 9
1
vote
0 answers

How can I detect when a StringGrid cell value has changed?

I am a noob who just entered this field. I know this question seems stupid, but please understand, I tried to look up a lot of info to solve this problem but failed. What I want to make is a simple Monitoring System, and it is almost done except for…
1
vote
1 answer

Delphi: Find Dialog & String Grid

Is there a way to do a text search in a string grid using a find dialog? I need to find a text and highlight it's background as usually when a text is found. Thanks!
maxfax
  • 4,281
  • 12
  • 74
  • 120
1
vote
1 answer

Delphi 10.4 - Sort Memtable by clicking Stringgrid Header

I feel like an idiot because my question seams so simple but I don't get it done :D My Settings is that: One Dataset (Memtable), One Stringgrid. The Grid is bind via live Bindungs. I would like to sort my Columns by clicking on the GridHeader. In…
fisi-pjm
  • 378
  • 2
  • 16
1
vote
1 answer

How to load a XML/CSV/ODB file in DBGrid in Lazarus/Free Pascal?

I want to open a database/spreadsheet in a TDBGrid in Lazarus, and I've tried DBGrid1.LoadFromFile(filename); with xml, csv, xlsx, odb. But with every file I get an error. This is the code I'm using, with 'xml' being different each time I…
Smiley17
  • 31
  • 7
1
vote
1 answer

How to open a html table file into a (string)grid using Lazarus?

I'm new here so feel free to give feedback on my way of asking. For a project at school I need to open html files with tables in a stringgrid using Lazarus. My teacher said I need to use pos to locate the html tags, and using and I should…
Smiley17
  • 31
  • 7
1
vote
1 answer

How to print a string grid in the center of a page?

So I want to print a string grid in the middle/center of another printed page that already has a printed/header and footer, but I'm not sure how to print the string grid in the middle/center of the page? Is there anything in the code below that I…
PrimeBeat
  • 444
  • 5
  • 15
1
vote
2 answers

Creating a TStringGrid class in delphi where the object array associated with the cells is specified as a more specific type

In Delphi, how can I create a class derived from the TStringGrid class such that the TObject array associated with the grids cells is of a more specific type for example TColor which would be used to specify the colour of the cell?
Tony Wolff
  • 732
  • 1
  • 10
  • 23
1
vote
3 answers

Delphi - reading the records of a database into a string grid

So how do you write the records of a database (from a TADOTable component) into a String grid? (the record's fields are all strings) I tried something like this but to no avail: procedure TfrmPuntehou.WriteToList(tbl:…
PrimeBeat
  • 444
  • 5
  • 15
1
vote
1 answer

Delphi - problem with string grid after sorting

So the string grid I have in the program I mentioned here: (Delphi - Changing active page's tab color and having it reset after clicking on another tab) sorts perfectly from smallest to largest but the grid glitches/goes haywire in a way. The sorted…
PrimeBeat
  • 444
  • 5
  • 15
1
vote
1 answer

How to read an integer value into a TCheckColumn in Delphi FMX with TStringGrid?

I need to make the TCheckColumn from the FMX.StringGrid to work from an integer value but I don't know how. My code reads from a JSON request and translates it to a stringgrid. In the database the "boolean" field is stored as integer, so 0 for false…
Mobius one
  • 171
  • 3
  • 12
1
vote
1 answer

filtering data loaded from txt file to stringgrid

guys! I have this txt file and I want to load the content into a stringgrid. Here's my code : procedure PopulateStringGrid(Grid: TStringGrid; const FileName: string); var TextFile, Line: TStringList; Row, col: Integer; begin Grid.RowCount :=…
mizkyd
  • 75
  • 1
  • 11