I realized that for laying out stuff dataGrids are really versatile. So I put a grid together that shows print sizes based on the film type. I have a table like this:
packID packName packDesc 35 6x6 6x45 spPrice mounting
0000 wal 8 Wallets x x x
0001 3x5 4- 3x5s x .65
0002 4x5 4- 4x5s x x .65
0003 5x5 2- 5x5s x .65
0004 11x14 1- 11x14 x x x 1.25 x
So my query goes like this:
My datagrid ends up looking like this:
' This returns a boolean.
While this does display, with little code, exactly how I want it to, how should I go about retrieving the values?
Or, should I go about this another way?
packID packName packDesc 35 6x6 6x45 spPrice mounting
0000 wal 8 Wallets x x x
0001 3x5 4- 3x5s x .65
0002 4x5 4- 4x5s x x .65
0003 5x5 2- 5x5s x .65
0004 11x14 1- 11x14 x x x 1.25 x
So my query goes like this:
Code:
Select Case flmType
Case "35mm"
strSql = "SELECT packID, packDesc, spPrice, mounting FROM wedPacks WHERE [35] = True"
Case "6x45"
strSql = "SELECT packID, packDesc, spPrice, mounting FROM wedPacks WHERE [6x45] = True"...
My datagrid ends up looking like this:
Code:
<asp:datagrid id="dgPrntSize" runat="server" AutoGenerateColumns="False">
<ItemStyle HorizontalAlign="Center"></ItemStyle>
<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
<Columns>
<asp:TemplateColumn HeaderText="Qty">
<ItemTemplate>
<asp:TextBox id="TextBox2" runat="server" Width="30px"></asp:TextBox>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Print Size">
<ItemTemplate>
<%# container.DataItem ("packDesc") %>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Mount">
<ItemTemplate>
<asp:dropdownlist id="Mount" tabIndex="12" runat="server" Visible='<%# container.DataItem ("mounting") %>'>
<asp:listitem id="mNone" runat="server" value="None" />
<asp:listitem id="aMount" runat="server" value="Art Board" />
<asp:listitem id="cMount" runat="server" value="Canvas" />
</asp:dropdownlist>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Spray">
<ItemTemplate>
<asp:CheckBox id="CheckBox1" runat="server" Visible='<%# isSpray(container.DataItem ("spPrice")) %>'>
Code:
</asp:CheckBox>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:datagrid>
While this does display, with little code, exactly how I want it to, how should I go about retrieving the values?
Or, should I go about this another way?