Click TDBGrid cell and display memo/blob record

I am using Delphi 3 with a TDBGrid component, whose datasource is a Paradox table.  In this table is a Memo field of a memo/blob type.  At run time, the column representing this memo/blob field displays a little page icon.  Clicking on this cell does nothing.


How does one detect when this particular cell has been clicked on, and how do I display the contents of this memo/blob field from the TDBGrid?
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

kretzschmarConnect With a Mentor Commented:
hi Monroe406,

use a second form, place there a tdbmemo (alclient) connect it it with your dataset of your form1 and the blobfield. this will show now allways the memocontent of the current record.

to show this form by doubleclick on the dbgrid-field use

procedure TForm1.DBGrid1DblClick(Sender: TObject);
  IF DBGrid1.SelectedField.FieldName = 'MyMemoFieldName' then

Monroe406Author Commented:
I have done as you have said...but it does not work.

The Form2 does appear, but the contents of the TDBMemo is blank.

My table does indeed have memo/blob fields with data in it, however that data is not showing up in the Form2.Show.

Yes, I have associated the TDBMemo.DataField to the corresponding table's field.

P.S. you failed to mention that I needed to drop a TTable and TDataSource component on the form.  I went ahead and did this, assuming you assumed I knew this.
hi Monroe406,

> you failed to mention that I needed to drop a TTable and TDataSource
>  component on the  form.

no that meant i not, use the  tdatasource of your form1, where the dbgrid is connected to it.

to do this, add after the implementation-keyword of your form2-unit :

uses TheNameOfYourForm1-Unit;

the datasourcename of the tdbmemo is :
Form1.Datasource1; //if it so named by yours

please try again

All Courses

From novice to tech pro — start learning today.