View Single Post
  #2 (permalink)  
Old November 12th, 2007, 12:54 AM
aliirfan84 aliirfan84 is offline
Authorized User
 
Join Date: Jan 2007
Location: Islamabad, Punjab, Pakistan.
Posts: 93
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to aliirfan84
Default

Dear,
    You have to make parent child relationship in dataset. First you have to get each tables data from Database into new table and then add this table to common dataset.
    DataSet has methods as shown below:

     dsObject.Relations.Add("relationName",dsObject.Tab les("table1").Columns("colName"),dsObject.Tables(" table2").Columns("colName")

This will create Parent-Child relationship.

Now in ur .aspx, take databinding control of ur choice(Grid,Repeater,DataList). Put another data control inside another. For example, if u take GridView then add another girdview/reapter control in using template column.

In ur .cs/.vb file, set dataSource property of parent databinding control to .dsObject. U just need to set child control datasource property to dsObject.CreatChilView("relationName").

Hope it will help.

Regards


Regards,
Ali Irfan
Software Engineer
Reply With Quote