Jump to content
uniGUI Discussion Forums
Sign in to follow this  
stevewong

Display and Edit a memo field in a DBGrid

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

Share this post


Link to post
Share on other sites

Hi,

 

I then try to set unidbgrid1.Columns[0].Editor := unimemo1 and was also failed.

What problem do you have?

Share this post


Link to post
Share on other sites

I just want to show a memo box when I click on one of the cell under the remark column. At present DBGrid show the text and did not allow me to edit.

 

post-5886-0-10733900-1510977637_thumb.png

Share this post


Link to post
Share on other sites

Please see our grid editor demo.

UniMemo1 must be placed on a TUniHiddenPanel component.

It also should be created at design time or in OnCreate event of the Owner form.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×