Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Create a Data-Relation using Entities?

Create a Data-Relation using Entities?

Scheduled Pinned Locked Moved Visual Basic
csshelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nlarson11
    wrote on last edited by
    #1

    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

    L 1 Reply Last reply
    0
    • N nlarson11

      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

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      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:

      N 1 Reply Last reply
      0
      • L Lost User

        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:

        N Offline
        N Offline
        nlarson11
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups