nested repeater controls
-
I'm trying to do a nested Repeater where I have two tables, one is my region and second is the projects table. There's a foreign key in the projects table for region. I am doing an inner join in my stored procedure and I need the data to be displayed like this: Region 1 strDate strTitle strContent strDate strTitle strContent strDate strTitle strContent Region 2 strDate strTitle strContent strDate strTitle strContent strDate strTitle strContent Region 3 strDate strTitle strContent strDate strTitle strContent strDate strTitle strContent Not like this: Region 1 strDate strTitle strContent Region 1 strDate strTitle strContent Region 1 strDate strTitle strContent Region 2 strDate strTitle strContent Region 2 strDate strTitle strContent Region 2 strDate strTitle strContent The problem is that all the samples build the relation in the code behind, where as mine is done in the stored procedure doing a inner join. If someone could show me how to do this I would really appreciate it!!! Thanks, Jaime
-
I'm trying to do a nested Repeater where I have two tables, one is my region and second is the projects table. There's a foreign key in the projects table for region. I am doing an inner join in my stored procedure and I need the data to be displayed like this: Region 1 strDate strTitle strContent strDate strTitle strContent strDate strTitle strContent Region 2 strDate strTitle strContent strDate strTitle strContent strDate strTitle strContent Region 3 strDate strTitle strContent strDate strTitle strContent strDate strTitle strContent Not like this: Region 1 strDate strTitle strContent Region 1 strDate strTitle strContent Region 1 strDate strTitle strContent Region 2 strDate strTitle strContent Region 2 strDate strTitle strContent Region 2 strDate strTitle strContent The problem is that all the samples build the relation in the code behind, where as mine is done in the stored procedure doing a inner join. If someone could show me how to do this I would really appreciate it!!! Thanks, Jaime
Hi Jaime. I'm guessing that you'd want to set up the relation in the code-behind, and have your stored procedure return two recordsets (one for the master records, one for the detail, with the key field relating them). Otherwise, the only way I can see of handling what you're describing is to: 1) not use Repeater controls and render it all through your own code; 2) maybe handle the ItemCreated event for the repeater and provide your own code for determining if display controls should be made visible/invisible based on the DataItem of the event args.