Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB-Aware

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 06-18-2012, 04:17 PM
Capfka Capfka is offline
Junior Member
 
Join Date: Oct 2010
Posts: 4
Default OnGetText in a DBGrid

Let's assume that I'm a bit thick - here's my story:

I have a DBGrid component being populated by an ADOQuery via a datasource. One of the fields is a memo, and I would like to display it as text. So, after reading the Delphi manual (because I haven't tried to do this before), I went to the object inspector, selected the DBGrid, clicked on the Columns editor, highlighted the memo field, went back to the columns editor and clicked on the Events tab. NO EVENTS. There should be, as I understand it, an OnGetText and an OnSetText event available for each field ...

I've hunted high and low, and I can find no trace of such an event.

I accept I'm doing something wrong, but I have no idea what!

I'm using Delphi 5 with the service pack installed.

Any help gratefully received.
Reply With Quote
  #2  
Old 06-20-2012, 01:18 AM
major major is offline
Member
 
Join Date: Jun 2011
Posts: 42
Default

To get to the get and set text methods, I believe you need to bring up the fields editor (double click your ADOQuery to open the fields editor) add all your fields (right click in the editor and select Add all fields). Now when you click on each field, you should have the field's properties and methods listed in the property editor.
Reply With Quote
Reply

Tags
dbgrid, delphi 5, ongettext

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:12 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.