I have two datatables loaded with data in MVC view
DataTable dtGrpDisplays= ViewBag.SubGrpDisplayDocs as DataTable;
DataTable dtDownloads= ViewBag.DownloadRequirements as DataTable;
dtGrpDisplays has records - CityId , Display Document Path, Group Id
dtDownloads has records - CityId, Download document Path, Group Id
I needs to display the Display Document first and then the download documents for that group Id.
In View , I have the following Code to display the Display Document
@{ for (int i = 0; i < dtGrpDisplays.Rows.Count; i++)
{
<div class="form_header"><h3> @dtGrpDisplays.Rows[i]["UploadTitle"].ToString() </h3></div>
<div id ="@i">
<iframe src="@dtGrpDisplays.Rows[i]["UploadPath"].ToString()" Id="@dtGrpDisplays.Rows[i]["Id"].ToString()" class="iframe" scrolling="no" width="100%" marginwidth ="0" marginheight="0" style="border:none;top:auto;"></iframe>
</div>
}
}
Now, my issues, how can i write a inside for loop to display the downloadable documents for that particular group Id from Datatable dtGrpDisplays.
I am quite new to MVC. Please help me with a solution.
Is this possible?
Thanks