This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > February 2006 > Master Details





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Master Details
CA_Tech

2006-02-12, 6:41 pm

I need to build a master / detail into a repeated region so that i would get a
page like

FOOTBALL
Jets Ny
Giants Ny
Bills Buffalo

BASEBALL
Yankees Ny
Mets Ny
Red Sox Boston

etc...

Attached is the real code i have so far. Or you can view the page at

http://hq.nyscaaonline.org/testing/...tion/step4.aspx

How do i pass the value of the current conference number to the datagrid in
hte details?


Thannks!


<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls"
Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,cultu
re=neutral" %>
<MM:DataSet
runat="Server"
id="sp1"
IsStoredProcedure="true"
CreateDataSet="true"
ConnectionString='<%#
System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_NYS
CAAData") %>'
DatabaseType='<%#
System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETY
PE_NYSCAAData") %>'
CommandText="dbo.sp_X_Temp"
Debug="true"
>

<Parameters>
<Parameter Name="@RETURN_VALUE" Type="Int" Direction="ReturnValue" />
</Parameters>
</MM:DataSet>
<MM:DataSet
runat="Server"
id="sp2"
IsStoredProcedure="true"
CreateDataSet="true"
ConnectionString='<%#
System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_NYS
CAAData") %>'
DatabaseType='<%#
System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETY
PE_NYSCAAData") %>'
CommandText="dbo.sp_X_Temp2"
Debug="true"
>

<Parameters>
<Parameter Name="@RETURN_VALUE" Type="Int" Direction="ReturnValue" />

<Parameter Name="@confnum" Value='<%# IIf((Request.Form("cnfnum") <>
Nothing), Request.Form("cnfnum"), "57") %>' Type="Int" Direction="Input" />
</Parameters>
</MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<p>test</p>
<table width="100%" border="0">
<form runat="server">
<ASP:Repeater runat="server" DataSource='<%# sp1.DefaultView %>'>
<ItemTemplate>
<tr>
<td colspan="2"><%# sp1.FieldValue("cnfTitle", Container) %> - <%#
sp1.FieldValue("cnfNum", Container) %></td>
</tr>
<tr>
<td width="9%">&nbsp;</td>
<td width="91%">
<script> session("ConfNum") = 56 </script>
<asp:DataGrid id="DataGrid1"
runat="server"
AllowSorting="False"
AutoGenerateColumns="false"
CellPadding="3"
CellSpacing="0"
ShowFooter="false"
ShowHeader="true"
DataSource="<%# sp2.DefaultView %>"
PagerStyle-Mode="NextPrev"
>

<HeaderStyle HorizontalAlign="center" BackColor="#E8EBFD"
ForeColor="#3D3DB6" Font-Name="Verdana, Arial, Helvetica, sans-serif"
Font-Bold="true" Font-Size="smaller" />
<ItemStyle BackColor="#F2F2F2" Font-Name="Verdana, Arial,
Helvetica, sans-serif" Font-Size="smaller" />
<AlternatingItemStyle BackColor="#E5E5E5" Font-Name="Verdana,
Arial, Helvetica, sans-serif" Font-Size="smaller" />
<FooterStyle HorizontalAlign="center" BackColor="#E8EBFD"
ForeColor="#3D3DB6" Font-Name="Verdana, Arial, Helvetica, sans-serif"
Font-Bold="true" Font-Size="smaller" />
<PagerStyle BackColor="white" Font-Name="Verdana, Arial,
Helvetica, sans-serif" Font-Size="smaller" />
<Columns>
<asp:BoundColumn DataField="ConfItemRecNum"
HeaderText="ConfItemRecNum"
ReadOnly="true"
Visible="True"/>
<asp:BoundColumn DataField="ConfernceNumber"
HeaderText="ConfernceNumber"
ReadOnly="true"
Visible="True"/>
<asp:BoundColumn DataField="ItemDescription"
HeaderText="ItemDescription"
ReadOnly="true"
Visible="True"/>
<asp:BoundColumn DataField="StartTime"
HeaderText="StartTime"
ReadOnly="true"
Visible="True"/>
<asp:BoundColumn DataField="EndTime"
HeaderText="EndTime"
ReadOnly="true"
Visible="True"/>
<asp:BoundColumn DataField="MaxCapExempt"
HeaderText="MaxCapExempt"
ReadOnly="true"
Visible="True"/>
<asp:BoundColumn DataField="CompExempt"
HeaderText="CompExempt"
ReadOnly="true"
Visible="True"/>
<asp:BoundColumn DataField="ItemDate"
HeaderText="ItemDate"
ReadOnly="true"
Visible="True"/>
</Columns>
</asp:DataGrid>
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</ItemTemplate>
</ASP:Repeater>
</form>
</table>

<p>&nbsp;</p>
</body>
</html>

Wally Kolcz

2006-02-12, 6:41 pm

Did you GROUP BY in the SQL statement?

--
Wally Kolcz
Developer / Support
ProjectProofing.com


CA_Tech

2006-02-12, 6:41 pm

yes

each stored proc pulls the correct info. what i do not know, is how in DW ASP.NET VB to get the varible from the master to pass to the detail.
CA_Tech

2006-02-16, 6:38 pm

anyone got any fresh insight on how I pass the id from the 'outer' datagrid to the 'inner' ?
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews