djpaul,
Thanks for helping me. I tried as you said...but it didnt work...
I tried using template field and then bind the value but for some reason I dont see the value when I run the page.
here is my sql query I used to bind the gridview:
Select bi.*, b.cAmtDue AS cAmtDue FROM bod_items bi, bod_inv b WHERE bi.cInvNum = '" + Request.QueryString["cInvNum"].ToString() + "' and bi.cInvNum = b.cInvNum
Here is my aspx for grid:
-
<asp:GridView ID="grdItems" runat="server" AllowSorting="True" AutoGenerateColumns="False"
-
BackColor="White" BorderColor="Black" BorderStyle="Solid" BorderWidth="1px"
-
CellPadding="4" ForeColor="Black" GridLines="Vertical" width="670px" Font-Size="Smaller">
-
<Columns>
-
<asp:TemplateField HeaderText="ROWID" SortExpression="rowid" Visible="False">
-
<EditItemTemplate>
-
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("rowid") %>'></asp:TextBox>
-
</EditItemTemplate>
-
<ItemTemplate>
-
<asp:Label ID="lblRowID" runat="server" Text='<%# Bind("rowid") %>'></asp:Label>
-
</ItemTemplate>
-
<HeaderStyle Font-Size="Small" HorizontalAlign="Center" />
-
<ItemStyle Font-Names="Arial" Font-Size="Smaller" />
-
</asp:TemplateField>
-
...
-
-
-
<asp:TemplateField>
-
-
<HeaderTemplate>Total Amount</HeaderTemplate>
-
<FooterTemplate>
-
<table border="1" cellpadding="0" cellspacing="0" width="100%">
-
<ItemTemplate>
-
<asp:Label ID="lblRowID" runat="server" Text='<%# Eval("cAmtDue") %>'></asp:Label>
-
</ItemTemplate>
-
<ItemTemplate>
-
<asp:Label ID="Label7" runat="server" Text='<%# Eval("cAmtDue") %>'></asp:Label>
-
</ItemTemplate>
-
</table>
-
</FooterTemplate>
-
</asp:TemplateField>
-
</Columns>
-
...
-
</asp:GridView>
-