Click here to Skip to main content
12,505,953 members (51,551 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET
i am finding this error..
DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'applicatio_nno'

DataKeyNames is ID which is Hidden field.
i have taken template fields to bind a data.
please solve my doubt

////////////////////////////////////////////////////////////////////////////////////


<asp:GridView ID="GridView1" runat="server" DataKeyNames="ID"
 
            onselectedindexchanged="GridView1_SelectedIndexChanged" CellPadding="4" ForeColor="#333333"
                                     GridLines="None" AutoGenerateColumns="False">
 
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
 
        <Columns>
            <asp:TemplateField ShowHeader="False" HeaderText="SELECT">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False"
                        CommandName="Select" Text="Select"></asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Application no">
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("applicatio_nno") %>'></asp:TextBox>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label16" runat="server" Text='<%# Bind("applicatio_nno") %>'>
Posted 1-Jan-13 19:30pm
Comments
   
Please do not re-post. You should use the page of your original question. Use "Improve question" (above) instead.
—SA
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

Replace "applicatio_nno" in the following line of your code with the "column name" returned by your query result:
<asp:label id="Label16" runat="server" text="<%# Bind("applicatio_nno") %>" xmlns:asp="#unknown"></asp:label>
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

I think every place it says 'Bind', it should say 'Eval'
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

hey i think you have to check below line data field name Speling
<asp:label id="Label16" runat="server" text="<%# Bind("applicatio_nno")%>"></asp:label>
You write :"applicatio_nno"
i think it should be wrong and should be like this. "application_no"
  Permalink  
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 4

I think your datasource, which you are binding to your grid view, does not contain the field having name 'applicatio_nno' check your datasource field, and include field with the same name.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160927.1 | Last Updated 2 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100