[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 975
  • Last Modified:

asp.net, obout

Everything is working except I am unable to view the templates information on the browser.
Any experts can find out why?

 <Templates>
                <obout:GridTemplate Visible="true" runat="server" ID="tplCompanyName">
                    <Template>
                            <b><u>22222<%# Container.Value %></u></b>
                            <asp:Label runat="server" ID="hello" Text="hello"></asp:Label>
                    </Template>
                </obout:GridTemplate>
            </Templates>
<%@ Page Title="Administrator Dashboard" Language="C#" MasterPageFile="~/AdminZone/MasterPage.master" AutoEventWireup="true" CodeFile="DashBoard.aspx.cs" Inherits="AdminZone_DashBoard" %>
<%@ Register TagPrefix="obout" Namespace="Obout.Grid" Assembly="obout_Grid_NET" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

  <script type="text/javascript">


      function onPopulateControls(sender, record) {
          record.QuotePackageId = sender.ForeignKeys.QuotePackageId.Value;

          return record;
      }
		</script>    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table>
<tr><td><h3>Dashboard</h3>
    </td></tr></table>
<table cellpadding="5" cellspacing="5">
<tr valign="top">
<td>
    <table cellpadding="0" cellspacing="0">
        <tr><td><b>Latest quote requests</b></td></tr>
        <tr><td>
            <br />
             <obout:Grid runat="server" Width="1920" ID="grid1" AutoGenerateColumns="false" PageSize="500"
		    DataSourceID="SqlDataSource2" 
		    FolderStyle="../UiObject/oBout/Grid/styles/style_12" 
		    AllowAddingRecords="false">
		    <Columns>
                <obout:Column DataField="QuotePackageId" HeaderText="Quote No." Width="285"></obout:Column>
                <obout:Column DataField="TotalQuoteCount" HeaderText="Total Quote Count"></obout:Column>
                <obout:Column DataField="FirstName" HeaderText="First Name"></obout:Column>
                <obout:Column DataField="LastName" HeaderText="Last Name"></obout:Column>
                <obout:Column DataField="PhoneNo" HeaderText="Phone No."></obout:Column>
                <obout:Column DataField="Email" HeaderText="Email"></obout:Column>
                <obout:Column DataField="CreatedDate" HeaderText="Quoted Date"></obout:Column>
                <obout:Column DataField="" HeaderText="" AllowEdit="true" AllowDelete="true" Width="180"></obout:Column>
             </Columns>
             <Templates>
                <obout:GridTemplate Visible="true" runat="server" ID="tplCompanyName">
                    <Template>
                            <b><u>22222<%# Container.Value %></u></b>
                            <asp:Label runat="server" ID="hello" Text="hello"></asp:Label>
                    </Template>
                </obout:GridTemplate>
            </Templates>
            <MasterDetailSettings LoadingMode="OnCallback" />
             <DetailGrids>
                <obout:DetailGrid runat="server" ID="grid2" AutoGenerateColumns="false"
                     AllowAddingRecords="false" ShowFooter="true" PageSize="25"
                     DataSourceID="SqlDataSource3" FolderStyle="../UiObject/oBout/Grid/styles/style_12" ForeignKeys="QuotePackageId">
                    <ClientSideEvents  ExposeSender="true" OnClientPopulateControls="onPopulateControls" />
                      <Columns>
                        <obout:Column AllowDelete="false"  DataField="QuotePackageId" HeaderText="" ReadOnly="false" Visible="false"></obout:Column>
                        <obout:Column AllowDelete="false"  DataField="QuoteId" HeaderText="" ReadOnly="true" Visible="false"></obout:Column>
                        <obout:Column AllowDelete="false"  DataField="PartNoId" HeaderText="Part No." Width="250"></obout:Column>
                        <obout:Column AllowDelete="false"  DataField="Quantity" HeaderText="Qty." Width="250"></obout:Column>
                        <obout:Column AllowDelete="false"  DataField="SpecialInstructions" HeaderText="Special Instructions" Width="250"></obout:Column>
                        <obout:Column DataField="" HeaderText="" AllowEdit="true" AllowDelete="true" Width="210" Align="center"></obout:Column>
                      </Columns>
                    <MasterDetailSettings LoadingMode="OnCallback" />
                </obout:DetailGrid>
            </DetailGrids>
        </obout:Grid>
        
            <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                ConnectionString="<%$ ConnectionStrings:aviationConnectionString %>" 
                SelectCommand="SELECT COUNT(Quotes.QuoteId) AS TotalQuoteCount, QuotePackages.QuotePackageId As QuotePackageId, Members.FirstName, Members.LastName, Members.PhoneNo, Members.Email, QuotePackages.CreatedDate as CreatedDate FROM Quotes INNER JOIN QuotePackages ON Quotes.QuotePackageId = QuotePackages.QuotePackageId INNER JOIN Members ON QuotePackages.MemberId = Members.MemberId GROUP BY QuotePackages.QuotePackageId, Members.FirstName, Members.LastName, Members.PhoneNo, Members.Email, QuotePackages.CreatedDate order by CreatedDate Desc">
            </asp:SqlDataSource>
             <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
                ConnectionString="<%$ ConnectionStrings:aviationConnectionString %>" 
                SelectCommand=" SELECT QuotePackageId, QuoteId, PartNoId, Quantity, SpecialInstructions FROM Quotes WHERE (QuotePackageId = @QuotePackageId)"
                UpdateCommand="Update Quotes Set Quantity = @Quantity, PartNoId = @PartNoId, SpecialInstructions = @SpecialInstructions Where QuoteId = @QuoteId"
                >
                <SelectParameters>
                    <asp:Parameter Name="QuotePackageId" Type="Int16" />
                </SelectParameters>
                <UpdateParameters>
                    <asp:Parameter Name="Quantity" Type="Int16"  />
                    <asp:Parameter Name="PartnoId" Type="String" />
                    <asp:Parameter Name="SpecialInstructions" Type="String" />
                </UpdateParameters>
            </asp:SqlDataSource>
            <br /><br /></td></tr>
    </table>
</td>
<td width="10"><br /></td>
<td>
    <table cellpadding="0" cellspacing="0">
        <tr><td><b>List of Users</b>&nbsp;<a href="ViewUsers.aspx">View all</a></td></tr>
         <tr>
            <td>
             <asp:GridView ID="GridView1" CaptionAlign="Left" Caption="" runat="server" AllowPaging="True" 
                AllowSorting="True" AutoGenerateColumns="False" CellPadding="4" 
                DataSourceID="SqlDataSource1" EnableModelValidation="True" ForeColor="#333333"  HeaderStyle-HorizontalAlign="Left"
                GridLines="both" Font-Size="Smaller">
                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                <Columns>
                    <asp:BoundField DataField="CompanyName" HeaderText="Company Name" 
                        SortExpression="CompanyName" />
                    <asp:BoundField DataField="FirstName" HeaderText="First Name" 
                        SortExpression="FirstName" />
                    <asp:BoundField DataField="LastName" HeaderText="Last Name" 
                        SortExpression="LastName" />
                    <asp:BoundField DataField="Description" HeaderText="Description"
                        SortExpression="Description" />
                </Columns>
                <EditRowStyle BackColor="#999999" />
                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
            </asp:GridView>
            
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:aviationConnectionString %>" 
                SelectCommand="SELECT top 5  Members.FirstName, Members.LastName, Members.CompanyName, MembersStatus.Description FROM Members INNER JOIN MembersStatus ON Members.StatusId = MembersStatus.StatusId INNER JOIN MembersType ON Members.MemberTypeId = MembersType.MemberTypeId GROUP BY Members.FirstName, Members.LastName, Members.CompanyName, MembersStatus.Description ORDER BY Members.CompanyName, Members.FirstName">
            </asp:SqlDataSource>
            
         </td></tr>
        <tr><td><br /><br /><br /><br /></td></tr>
    </table>
</td></tr>
</table>    
    
    
</asp:Content>

Open in new window

0
Webboy2008
Asked:
Webboy2008
1 Solution
 
enkorCommented:
should not the TEMPLATE be into COLUMNS?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now