Welcome Guest
Tanvtech logo
Tanvtech logo
 
Add Tables for master and detail:

Create foreign key relationship:

Add some data in both tables:
Now open new web “TanvtechMasterDetailGrid” web project and bind tables with grids.
Drag ASPXGridview:


Drag ASPXGridview:
Bind it with data source:


Now master grid is attached with data source:

Now drag another ASPXGridview within tags of TanvtechMasterGrid:



Tags of tamplates and detailrows are mandatory like in the picture above. Now bind the TanvtechDetailgrid with dataSource add sqldatasource:

Give connectionstring and select command:

Write down datasiourseid and keyfieldname in TanvtechDetailgrid:


Now comes to code file and write following:

Now run the application that’s it.
That’s it thanks.
 
© Tanvtech. All Rights Reserved.