Jump to content

Display and Edit a memo field in a DBGrid


stevewong

Recommended Posts

Hi,

 

I would like to display/edit a memo field in a unidbgrid, my code is as below :

 

  ClientDataSet1.FieldDefs.Add('Remark', ftmemo,200 );

  ClientDataSet1.CreateDataSet;

  Clientdataset1.Close;

  AField := clientdataset1.FieldDefs[0].CreateField(clientdataset1);

 

 ClientDataSet1.Active := True;

  ClientDataSet1.AppendRecord(['line1, line2... in memo']);

 

My problem is : if displaymemo = false then the DBgrid will show the word (memo) within the cell.

 

if set set displaymemo := true, I can see the memo content but I was not able to edit it. Is there a way when I click on the cell, a memo box will come out so that i can edit the text inside ?

 

I then try to set unidbgrid1.Columns[0].Editor := unimemo1 and was also failed. What should I do, please help !

 

Regards,

Steve

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...