DataBinding:'System.Data.DataRowView'不包含名为'practice_code'的属性。 [英] DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'practice_code'.

查看:71
本文介绍了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'的属性



当您的数据库中的coloumn名称和您在源中使用的列名称
$时会出现此错误b $ b(Eval())不匹配..
DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'practice_code'

This error will arise when the coloumn name in your db and the column name you used in the source
( Eval(" ")) does not match..


你好朋友,





检查你的sql查询,你有一个名为'practice_code'的列。
Hi friend,


Check your sql query that you have the column with the name 'practice_code'.


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

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆