Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,
I am getting following error in page first time loading..
code is...

XML
<asp:TemplateField HeaderText="Cheque No.">

          <ItemTemplate>

              <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("ChequeNo")%>'></asp:TextBox>

          </ItemTemplate>

      </asp:TemplateField>


DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'ChequeNo'.
Posted
Updated 29-Jun-11 0:31am
v2
Comments
senguptaamlan 29-Jun-11 6:54am    
please, explain a bit more....the Solution1 is quite good....can't understand the issue that you are facing with the solution.
jagadeesh123qqq 29-Jun-11 6:58am    
above code will work only when i am accessing the data from database but first time i am not interested to bind the data..
that what i need to do..
hitesh_tech 29-Jun-11 8:00am    
If you are using <%# Eval("ChequeNo")%> in .Net then it associates with Databinding for more details refer

http://weblogs.asp.net/leftslipper/archive/2007/06/29/how-asp-net-databinding-deals-with-eval-and-bind-statements.aspx

http://weblogs.asp.net/jgalloway/archive/2005/09/20/425687.aspx

i Guess May be You are Using a Dataset or
List of your Class to bind Your Grid Checkbr mode="hold" />
1.In your ds.table there Should Be columnName like "ChequeNo"
<br />
2.If your Binding it with Your list of Class then check the property in which you have taken you  ChequeNo column value and write that property name in <br />
gridview.
 
Share this answer
 
Comments
jagadeesh123qqq 29-Jun-11 8:06am    
Thanks... there was no column in the dataset
Issue is that the source table used for binding repeater does not contain column named "ChequeNo" or the column containing data of "ChequeNo" is misspelled or returning "no column name"
 
Share this answer
 
Comments
jagadeesh123qqq 29-Jun-11 6:38am    
ya but this is when first time entering into the page.that time i need to show the emty grid
Please check the query you have taken.

Make sure their exists ChequeNo field in the table.

select ChequeNo ,abc,xyz from table
 
Share this answer
 

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


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900