I have a paradox table with a memo field. I want to display the contents of the memo field in a DBGrid without any additional components. How can I show this?
The simple answer is, you can't. However, there is a way to show part of the memo... Create a calculated field that's 254 characters wide. In the OnCalcFields event handler for the table, put something like the following:
put the following code in the OnGetText event of the memo field:
Code:
Text:=Sender.asString;
TDBGrid displays the text property of fields. TField.Text returns "[MEMO]" for a memo field by default, as you usually see. By using the OnGetText event you can modify the behaviour of the Text property to return the value you require.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.