带有EntityDataSource的JQGrid没有从相关对象获取列

时间:2012-12-05 17:05:56

标签: jqgrid jqgrid-asp.net entitydatasource

JQGrid,EntityDataSource没有从相关对象获取列

电话表中与VetCertifieds中的phoneid相关的字段数字给出错误:数据源中不存在DataField = Phone.Number的列。

Phone.Number在DataList中工作。

任何想法?

  <cc1:JQGrid ID="Jqgrid1" runat="server" DataSourceID="EntityDataSource1" 
            ShrinkToFit="False">
            <Columns> 
                   <cc1:JQGridColumn DataField="FirstName" >                       
                </cc1:JQGridColumn>
                <cc1:JQGridColumn DataField="MiddleName"  Visible="false">
                </cc1:JQGridColumn>
                <cc1:JQGridColumn DataField="LastName" >
                </cc1:JQGridColumn>
                <cc1:JQGridColumn DataField="Phone.Number" >
                </cc1:JQGridColumn>
                <cc1:JQGridColumn DataField="AddressID" >
                </cc1:JQGridColumn>


            </Columns>
        </cc1:JQGrid>

    <asp:EntityDataSource ID="EntityDataSource1" runat="server" 
        ConnectionString="name=VetPhoneBookContext" 
        DefaultContainerName="VetPhoneBookContext" 
        EntitySetName="VetCertifieds" Include="Phone,Address" EnableFlattening="False"
            >
     </asp:EntityDataSource>

0 个答案:

没有答案