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. Database & SysAdmin
  3. Database
  4. Filling a typed dataset

Filling a typed dataset

Scheduled Pinned Locked Moved Database
databasehelpcsssalesxml
2 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.
  • S Offline
    S Offline
    steve_rm
    wrote on last edited by
    #1

    Hello, I have a typed dataset which I want to display in an ultragrid (infragistics) and display the parent and the children. I can display this ok when I want to display all of the parents and children. But the problem is when user will need to select one parent (by customerID number) from a list and display that parent with its children in the grid. I have created the dataset schema dsAssembliedEquipment.xsd and my 2 tables assembly and AssembiledEquipment. And also created the relationship between them. I have a stored procedure (getDataByCustomerID) that will find the customerID of the assembly (parent) table. This is my code for setting the grid. 'Table Adapter to get the customer ID record Me.TA_Assembly1.GetDataCustomerID(customerID) 'Fill the assembly (parent) table and assembliedEquipment table(child) Me.TA_Assembly1.Fill(Me.DsAssemblyEquipment1.Assembly) Me.TA_AssembliedEquipment1.Fill(Me.DsAssemblyEquipment1.AssembliedEquipment) Me.grdCustomersAssembly.DataMember = "Assembly" Me.grdCustomersAssembly.DataSource = Me.DsAssemblyEquipment1 Code for the stored procedure getDataCustomerID: ALTER PROCEDURE [dbo].[Assembly_SelByCustomerID] ( @CustomerID int ) AS SET NOCOUNT ON; SELECT AssemblyID, CustomerID, AssemblyName FROM dbo.[Assembly] WHERE CustomerID = @CustomerID I have Assembly (parent) Table fields AssemblyID / customerID / AssemblyName I have child table called AssemblyEquipment (child) fields SerialNo / make / Model / AssemblyID (Foreign Key) Many thanks for any help with this problem, Steve

    M 1 Reply Last reply
    0
    • S steve_rm

      Hello, I have a typed dataset which I want to display in an ultragrid (infragistics) and display the parent and the children. I can display this ok when I want to display all of the parents and children. But the problem is when user will need to select one parent (by customerID number) from a list and display that parent with its children in the grid. I have created the dataset schema dsAssembliedEquipment.xsd and my 2 tables assembly and AssembiledEquipment. And also created the relationship between them. I have a stored procedure (getDataByCustomerID) that will find the customerID of the assembly (parent) table. This is my code for setting the grid. 'Table Adapter to get the customer ID record Me.TA_Assembly1.GetDataCustomerID(customerID) 'Fill the assembly (parent) table and assembliedEquipment table(child) Me.TA_Assembly1.Fill(Me.DsAssemblyEquipment1.Assembly) Me.TA_AssembliedEquipment1.Fill(Me.DsAssemblyEquipment1.AssembliedEquipment) Me.grdCustomersAssembly.DataMember = "Assembly" Me.grdCustomersAssembly.DataSource = Me.DsAssemblyEquipment1 Code for the stored procedure getDataCustomerID: ALTER PROCEDURE [dbo].[Assembly_SelByCustomerID] ( @CustomerID int ) AS SET NOCOUNT ON; SELECT AssemblyID, CustomerID, AssemblyName FROM dbo.[Assembly] WHERE CustomerID = @CustomerID I have Assembly (parent) Table fields AssemblyID / customerID / AssemblyName I have child table called AssemblyEquipment (child) fields SerialNo / make / Model / AssemblyID (Foreign Key) Many thanks for any help with this problem, Steve

      M Offline
      M Offline
      M H 1 2 3
      wrote on last edited by
      #2

      If you haven't already solved your problem I think it would be helpful to clarify what part you are having a problem with. Are you trying to change the stored procedure or add a customer row to the datagrid after you bind the data?

      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