本文介绍了DataBinding:'System.Data.DataRowView'不包含名为'practice_code'的属性。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以帮我解决这个问题:

anyone please help me in this problem:

<asp:GridView ID="aftersearchgridview" runat="server" AutoGenerateColumns="False"
    Height="293px" Width="578px" BackColor="White" BorderColor="White" BorderStyle="Ridge"
    BorderWidth="2px" CellPadding="4" GridLines="None" CellSpacing="2" OnRowDataBound="aftersearchgridview_RowDataBound"
    OnRowCommand="Detailbtnclick">
    <Columns>
         <asp:TemplateField HeaderText="S.No">
        <ItemTemplate>
            <asp:Label ID="Sr_No" runat="server"></asp:Label>
        </ItemTemplate>
    </asp:TemplateField>
        <asp:TemplateField HeaderText="Rejection Detail">
         <ItemTemplate>
            <asp:Label ID="rejdet" runat="server" Text='<% #Eval("code_description")%>'></asp:Label>
        </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Practice">
         <ItemTemplate>
            <asp:Label ID="practice" runat="server" Text='<% #Eval("practice_code")%>'></asp:Label>
        </ItemTemplate>
        </asp:TemplateField>


        <asp:ButtonField ButtonType="Button" runat="server" Text="Detail" HeaderText="Detail"
           CommandName="Detailbtn"/>
    </Columns>
    <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
    <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" />
    <PagerStyle ForeColor="Black" HorizontalAlign="Right" BackColor="#C6C3C6" />
    <RowStyle BackColor="#DEDFDE" ForeColor="Black" />
    <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
    <SortedAscendingCellStyle BackColor="#F1F1F1" />
    <SortedAscendingHeaderStyle BackColor="#594B9C" />
    <SortedDescendingCellStyle BackColor="#CAC9C9" />
    <SortedDescendingHeaderStyle BackColor="#33276A" />
</asp:GridView>



aboye代码抛出异常:

DataBinding: System.Data.DataRowView'不包含名为'practice_code'的属性。

推荐答案



这篇关于DataBinding:'System.Data.DataRowView'不包含名为'practice_code'的属性。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 02:41