BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Objects on a grid

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OO design
View previous topic :: View next topic  
Author Message
Gabriel GIbaut
Guest





PostPosted: Fri Feb 04, 2005 2:17 pm    Post subject: Objects on a grid Reply with 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


Back to top
Solerman Kaplon
Guest





PostPosted: Fri Feb 04, 2005 8:17 pm    Post subject: Re: Objects on a grid Reply with quote



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
Sad

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 Smile 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





PostPosted: Tue Feb 08, 2005 7:23 am    Post subject: Re: Objects on a grid Reply with quote



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





PostPosted: Wed Feb 09, 2005 5:22 pm    Post subject: Re: Objects on a grid Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi OO design All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.