Create a Data-Relation using Entities?
-
Hello, When loading grids with data tables, if you want to have nested tables (grid shows a + to expand and show the 2nd table) you create a datarelation - method available in the dataset object. I have a list(of ???) that I feed the grid for it's datasource where the ??? is an object(entity) that has fields (just like a table). Is there an equivalent to creating a datarelation so I nest the entity objects or would I have to convert the entities to datatables to do this? Any help would be appreciated... Nathan
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
-
Hello, When loading grids with data tables, if you want to have nested tables (grid shows a + to expand and show the 2nd table) you create a datarelation - method available in the dataset object. I have a list(of ???) that I feed the grid for it's datasource where the ??? is an object(entity) that has fields (just like a table). Is there an equivalent to creating a datarelation so I nest the entity objects or would I have to convert the entities to datatables to do this? Any help would be appreciated... Nathan
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
nlarson11 wrote:
When loading grids with data tables, if you want to have nested tables (grid shows a + to expand and show the 2nd table) you create a datarelation - method available in the dataset object.
No, if you want to display your data in that way you'll need a drill-down grid. Relations make sure the data stays consistent; meaning that if there's a relation between two fields, that one will only accept values that occur in the other. Some drill-down grids use those relations to create the subgrids dynamically.
nlarson11 wrote:
Is there an equivalent to creating a datarelation so I nest the entity objects or would I have to convert the entities to datatables to do this?
This is not natively supported; you'll need a grid that support the drill-down functionality, or create your own.
Bastard Programmer from Hell :suss:
-
nlarson11 wrote:
When loading grids with data tables, if you want to have nested tables (grid shows a + to expand and show the 2nd table) you create a datarelation - method available in the dataset object.
No, if you want to display your data in that way you'll need a drill-down grid. Relations make sure the data stays consistent; meaning that if there's a relation between two fields, that one will only accept values that occur in the other. Some drill-down grids use those relations to create the subgrids dynamically.
nlarson11 wrote:
Is there an equivalent to creating a datarelation so I nest the entity objects or would I have to convert the entities to datatables to do this?
This is not natively supported; you'll need a grid that support the drill-down functionality, or create your own.
Bastard Programmer from Hell :suss:
Thank you Eddy, I have a grid that supports drill-down so that's not a problem. I was just hoping to use entities instead of having to convert but from what you said, doesn't look like that's possible. Nathan
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous 'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous