这是我的实体数据源
<asp:EntityDataSource ID="EntityDataSourceCLient" runat="server"
ConnectionString="name=MBSDbEntities" DefaultContainerName="MBSDbEntities"
EnableFlattening="False" EntitySetName="ReservationLists" Include="UserProfile" OrderBy="it.Date" Where="">
</asp:EntityDataSource>
这是我的网格视图
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
CellPadding="3" DataKeyNames="ID" DataSourceID="EntityDataSourceCLient">
<Columns>
<asp:TemplateField HeaderText="UserID" SortExpression="UserProfile.FirstMidname">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("UserProfile.FirstMidname") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("UserProfile.FirstMidname") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="TransactionType" HeaderText="TransactionType"
SortExpression="TransactionType" />
<asp:BoundField DataField="Date" HeaderText="Date" SortExpression="Date" />
<asp:BoundField DataField="Status" HeaderText="Status"
SortExpression="Status" />
</Columns>
<FooterStyle BackColor="White" ForeColor="#000066" />
<HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
<RowStyle ForeColor="#000066" />
<SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#F1F1F1" />
<SortedAscendingHeaderStyle BackColor="#007DBB" />
<SortedDescendingCellStyle BackColor="#CAC9C9" />
<SortedDescendingHeaderStyle BackColor="#00547E" />
</asp:GridView>
我可以显示 2 个相关表格,但无法显示特定数量的表格。你们能帮帮我吗?先感谢您。