CodeSmith Community
Your Code. Your Way. Faster!

Detail panels do not show n:n foreign key data

Latest post 08-31-2007 4:06 PM by mike123. 1 replies.
  • 08-31-2007 6:08 AM

    • enijburg
    • Top 500 Contributor
    • Joined on 10-03-2006
    • Posts 9
    • Points 165

    Detail panels do not show n:n foreign key data

    While generating the admin website it would be very nice if the code in bold is generated for the detail panels as well. I anybody has a lead on this I will be happy to code it and release a patch.

    Regards,
    Ewart

    <asp:Panel ID="ShopLocationPanel1" runat="server" CssClass="collapsePanel" Height="0">
        <data:EntityGridView ID="GridViewShopLocation" runat="server" AutoGenerateColumns="False"
            OnSelectedIndexChanged="GridViewShopLocation_SelectedIndexChanged" DataSourceID="ShopLocationDataSource"
            DataKeyNames="ShopLocationId" AllowMultiColumnSorting="false" DefaultSortColumnName=""
            DefaultSortDirection="Ascending" ExcelExportFileName="Export_ShopLocation.xls"
            Visible='<%# (FormView1.DefaultMode == FormViewMode.Insert) ? false : true %>'>
            <Columns>
                <asp:CommandField ShowSelectButton="True" />
                <data:HyperLinkField HeaderText="Location" DataNavigateUrlFormatString="LocationEdit.aspx?LocationId={0}"
                    DataNavigateUrlFields="LocationId" DataContainer="LocationIdSource" DataTextField="LocationName" />
            </Columns>
            <EmptyDataTemplate>
                <b>No Shop locations found! </b>
                <asp:HyperLink runat="server" ID="hypShopLocation" NavigateUrl="~/admin/ShopLocationEdit.aspx">Add New</asp:HyperLink>
            </EmptyDataTemplate>
        </data:EntityGridView>
        <data:ShopLocationDataSource ID="ShopLocationDataSource" runat="server"
            SelectMethod="Find" EnableDeepLoad="true">
            <DeepLoadProperties Method="IncludeChildren" Recursive="False">
                <Types>
                    <data:ShopLocationProperty Name="Location" />
                </Types>
            </DeepLoadProperties>

            <Parameters>
                <data:SqlParameter Name="Parameters">
                    <Filters>
                        <data:ShopLocationFilter Column="ShopId" QueryStringField="ShopId" />
                    </Filters>
                </data:SqlParameter>
                <data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" />
            </Parameters>
        </data:ShopLocationDataSource>
        <br />
    </asp:Panel>

    • Post Points: 35
  • 08-31-2007 4:06 PM In reply to

    • mike123
    • Top 10 Contributor
    • Joined on 02-25-2005
    • Toronto, Ontario
    • Posts 726
    • Points 16,910

    Re: Detail panels do not show n:n foreign key data

    Checked in rev. 622

    Mike Shatny
    --------------------------------------------------------------
    Member of the .netTiers team http://www.nettiers.com
    --------------------------------------------------------------

    • Post Points: 5
Page 1 of 1 (2 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems