Recent

Author Topic: TDBGrid single record  (Read 4319 times)

TRNelson

  • Jr. Member
  • **
  • Posts: 64
TDBGrid single record
« on: January 25, 2016, 02:59:00 am »
Is there an equivalent to TDBGrid that displays one data record at a time in form format?

JanRoza

  • Hero Member
  • *****
  • Posts: 709
    • http://www.silentwings.nl
Re: TDBGrid single record
« Reply #1 on: January 25, 2016, 07:24:05 am »
That's what DBEdit fields are for, you create a new form and place some DBEdits on it to show/change the data of the record.
OS: Windows 11 / Linux Mint 22.1
       Lazarus 4.0 RC FPC 3.2.2
       CodeTyphon 8.70 FPC 3.3.1

TRNelson

  • Jr. Member
  • **
  • Posts: 64
Re: TDBGrid single record
« Reply #2 on: January 25, 2016, 07:29:00 am »
That's what DBEdit fields are for, you create a new form and place some DBEdits on it to show/change the data of the record.
That will work fine if you know how many columns you are dealing with in your table and what the names are.  I am hoping for something more like the way TDBGrid works but only display one record in a form format.

FTurtle

  • Sr. Member
  • ****
  • Posts: 292
Re: TDBGrid single record
« Reply #3 on: January 25, 2016, 07:57:43 am »
That's what DBEdit fields are for, you create a new form and place some DBEdits on it to show/change the data of the record.

I think TRNelson need something like TDBVertGridEh from EhLib, but free.

http://www.ehlib.com/sites/default/files/images/screenshots/dbvertgrideh_0.png

dogriz

  • Full Member
  • ***
  • Posts: 127
Re: TDBGrid single record
« Reply #4 on: January 25, 2016, 08:45:30 am »
You can use StringGrid for that, with some coding.
FPC 3.2.2
Lazarus 2.2.4
Debian x86_64, arm

tatamata

  • Hero Member
  • *****
  • Posts: 804
    • ZMSQL - SQL enhanced in-memory database
Re: TDBGrid single record
« Reply #5 on: January 25, 2016, 09:51:18 am »
I'm looking for such component too...it is what in other environments would be called "Form View" or "Card View" or "Card".

dogriz

  • Full Member
  • ***
  • Posts: 127
Re: TDBGrid single record
« Reply #6 on: January 25, 2016, 01:19:46 pm »
Here is simple example using StringGrid (I used Firebird connection and employee database).
FPC 3.2.2
Lazarus 2.2.4
Debian x86_64, arm

TRNelson

  • Jr. Member
  • **
  • Posts: 64
Re: TDBGrid single record
« Reply #7 on: January 25, 2016, 05:08:17 pm »
I'm looking for such component too...it is what in other environments would be called "Form View" or "Card View" or "Card".
Yes, that describes it.  I have seen it often.

TRNelson

  • Jr. Member
  • **
  • Posts: 64
Re: TDBGrid single record
« Reply #8 on: January 25, 2016, 05:31:11 pm »
Here is simple example using StringGrid (I used Firebird connection and employee database).
This is a very good example.  I had not thought of that.  I can build upon this.  Thank you very much.

I am very new to this 'new' approach to programming.  I still live and work in the old mainframe world.  I may (WILL) have more questions and hope they aren't trivial.

 

TinyPortal © 2005-2018