 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Gabriel GIbaut Guest
|
Posted: Fri Feb 04, 2005 2:17 pm Post subject: Objects on a grid |
|
|
Hello,
I have a collection of objects which i need to edit on a grid (i just need
to work with a couple of their string properties). I need to do some custom
drawing too.
My initial idea was to use a TStringGrid control and associate the
underlying object with the objects property, so when the user
enters-modifies a string i could handle the event and work with the
underlying object.
But the TStringGrid just lets you edit the data, if you need to add a line,
you need to do all the key processing by yourself.
I suppose a TClientDataset would be helpful but i´m short of ideas on how to
associate the dataset records with the objects and keep them synchronized.
Buying a grid is out of discussion because this is just an accesory feature
:(
TIA
Gabriel
|
|
| Back to top |
|
 |
Solerman Kaplon Guest
|
Posted: Fri Feb 04, 2005 8:17 pm Post subject: Re: Objects on a grid |
|
|
Gabriel GIbaut escreveu:
| Quote: | Hello,
I have a collection of objects which i need to edit on a grid (i just need
to work with a couple of their string properties). I need to do some custom
drawing too.
My initial idea was to use a TStringGrid control and associate the
underlying object with the objects property, so when the user
enters-modifies a string i could handle the event and work with the
underlying object.
But the TStringGrid just lets you edit the data, if you need to add a line,
you need to do all the key processing by yourself.
I suppose a TClientDataset would be helpful but i´m short of ideas on how to
associate the dataset records with the objects and keep them synchronized.
Buying a grid is out of discussion because this is just an accesory feature
|
Try mustangpeak.net and look for a link for the CoolBreeze control, its
opensource, its the virtual equivalent VirtualTreeView-like of the ListView. I
bet there isnt something you need that can't be made with it It says is still
beta, but truste me, its very usable and all bugs I have found are already fixed.
Solerman
|
|
| Back to top |
|
 |
Lars Frische Guest
|
Posted: Tue Feb 08, 2005 7:23 am Post subject: Re: Objects on a grid |
|
|
Gabriel GIbaut wrote:
| Quote: | Hello,
I have a collection of objects which i need to edit on a grid (i just need
to work with a couple of their string properties). I need to do some custom
drawing too.
My initial idea was to use a TStringGrid control and associate the
underlying object with the objects property, so when the user
enters-modifies a string i could handle the event and work with the
underlying object.
But the TStringGrid just lets you edit the data, if you need to add a line,
you need to do all the key processing by yourself.
I suppose a TClientDataset would be helpful but i´m short of ideas on how to
associate the dataset records with the objects and keep them synchronized.
Buying a grid is out of discussion because this is just an accesory feature
:(
TIA
Gabriel
Hi Gabriel |
Refer to http://www.gexperts.com/CustomDS.html for an excellent example
on how to write your own custom dataset. The source is available on
http://www.gexperts.com/CustomDatasets.zip and it includes an example
about handling objects in a TCollection (CollectionEdit.pas). Using this
example, I was able to write my own dataset that supports
TObjectLists. If you are interested, I am happy to send you the source.
Cheers Lars.
--
Lars Frische
Software Developer
Test Maschinen Technik GmbH
Germany
|
|
| Back to top |
|
 |
Gabriel GIbaut Guest
|
Posted: Wed Feb 09, 2005 5:22 pm Post subject: Re: Objects on a grid |
|
|
Lars,
I would appreciate if you send me some of your sources because that´s what i
really need.
Thanks
Gabriel
"Lars Frische" <nospam (AT) eddymax (DOT) com> escribió en el mensaje
news:42086748$1 (AT) newsgroups (DOT) borland.com...
| Quote: | Gabriel GIbaut wrote:
Hello,
I have a collection of objects which i need to edit on a grid (i just
need
to work with a couple of their string properties). I need to do some
custom
drawing too.
My initial idea was to use a TStringGrid control and associate the
underlying object with the objects property, so when the user
enters-modifies a string i could handle the event and work with the
underlying object.
But the TStringGrid just lets you edit the data, if you need to add a
line,
you need to do all the key processing by yourself.
I suppose a TClientDataset would be helpful but i´m short of ideas on
how to
associate the dataset records with the objects and keep them
synchronized.
Buying a grid is out of discussion because this is just an accesory
feature
:(
TIA
Gabriel
Hi Gabriel
Refer to http://www.gexperts.com/CustomDS.html for an excellent example
on how to write your own custom dataset. The source is available on
http://www.gexperts.com/CustomDatasets.zip and it includes an example
about handling objects in a TCollection (CollectionEdit.pas). Using this
example, I was able to write my own dataset that supports
TObjectLists. If you are interested, I am happy to send you the source.
Cheers Lars.
--
Lars Frische
Software Developer
Test Maschinen Technik GmbH
Germany
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|