I've added a .Data property to the TRow class that is of the type Pointer...and am just checking to make sure it will not shoot me in the foot. Basically, I'm trying to replicate the idea of storing data in the same way a TListItem does (for TListView). I'd rather do this than store the data with the cell, if possible. Essentially, I have a collection of data (TCollection/TCollectionItem) where I'd like to associate a TCollectionItem with each row. So far, studying the NxCells unit, it looks like I'm going to be ok (though I realize future versions may break this idea). Any thoughts?
Thanks
Mike
TRow.Data
Started by Michael Cessna, Jun 17 2008 05:41 PM
4 replies to this topic
#1
Posted 17 June 2008 - 05:41 PM
#2
Posted 17 June 2008 - 06:13 PM
I had the same idea when I started with NextGrid, see http://www.bergsoft....?showtopic=1529
Boki suggested the property ObjectReference which I use now, no need for a separate Data property...
Boki suggested the property ObjectReference which I use now, no need for a separate Data property...
#3
Posted 17 June 2008 - 07:28 PM
Hi,
Thanks for your reply. I started out using the TCell.ObjectReference property, but found it a little cumbersome, since I didn't want to store an ObjectReference with each cell, or try to access another cell's ObjectReference property (when trying to use the ObjectReference of only one cell per row). The TRow class seems like the ideal place store data associated with a row; I'm just not sure if there are any scenarios where this will become problematic.
Mike
Thanks for your reply. I started out using the TCell.ObjectReference property, but found it a little cumbersome, since I didn't want to store an ObjectReference with each cell, or try to access another cell's ObjectReference property (when trying to use the ObjectReference of only one cell per row). The TRow class seems like the ideal place store data associated with a row; I'm just not sure if there are any scenarios where this will become problematic.
Mike
QUOTE (AIM @ Jun 17 2008, 12:13 PM) <{POST_SNAPBACK}>
I had the same idea when I started with NextGrid, see http://www.bergsoft....?showtopic=1529
Boki suggested the property ObjectReference which I use now, no need for a separate Data property...
Boki suggested the property ObjectReference which I use now, no need for a separate Data property...
#4
Posted 18 June 2008 - 12:17 AM
Hello,
From next release there will be Row property (Row[Index]) and it will have Data (Pointer) property.
regards
From next release there will be Row property (Row[Index]) and it will have Data (Pointer) property.
regards
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.
#5
Posted 18 June 2008 - 02:17 AM
Awesome, thanks!
Mike
Mike
QUOTE (Boki (Berg) @ Jun 17 2008, 06:17 PM) <{POST_SNAPBACK}>
Hello,
From next release there will be Row property (Row[Index]) and it will have Data (Pointer) property.
regards
From next release there will be Row property (Row[Index]) and it will have Data (Pointer) property.
regards
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











