Troubleshooting databinding issue

DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'Title'.

What are the common causes for this?

Here is the markup for the gridview:

<asp:GridView ID="gvCart" runat="server" Font-Names="Arial" HorizontalAlign="Center"  RowStyle-Wrap="false"
AutoGenerateColumns="False" Width="100%" CellPadding="2" GridLines="None" BorderColor="Transparent">
<asp:BoundField DataField="ISBN" HeaderText="ISBN" Visible="False" />
<asp:TemplateField HeaderText="Item Description">
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Title") %>'></asp:TextBox>
<HeaderStyle CssClass="Title_HeaderStyle" />
<ItemStyle CssClass="Title_ItemStyle" />
<asp:Label EnableViewState="false" ID="Label1" runat="server" Text='<%# Bind("Title") %>'></asp:Label>
<asp:BoundField DataField="DETAILS" HeaderText="Details">
<HeaderStyle CssClass="Details_HeaderStyle" />
<ItemStyle CssClass="Details_ItemStyle" />
<asp:BoundField DataField="TYPE" HeaderText="Type">
<HeaderStyle CssClass="Type_HeaderStyle" />
<ItemStyle CssClass="Type_ItemStyle" />
<asp:BoundField DataField="Price" HeaderText="Price">
<HeaderStyle CssClass="Price_HeaderStyle" />
<ItemStyle CssClass="Price_ItemStyle" />
<asp:BoundField DataField="QTY" HeaderText="Qty">
<HeaderStyle CssClass="Qty_HeaderStyle" />
<ItemStyle CssClass="Qty_ItemStyle" />
<asp:BoundField DataField="Extended" HeaderText="Ext">
<HeaderStyle CssClass="Extended_HeaderStyle" />
<ItemStyle CssClass="Extended_ItemStyle" />

Open in new window

Tom KnowltonWeb developerAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

binaryevoConnect With a Mentor Commented:
That typically means that your data structure your binding to doesn't contain a column / property called "Title".   Check your data that's coming back before you can .DataBind() and audit it against the Bind("Title") just to be sure that you have your naming correct.
Tom KnowltonWeb developerAuthor Commented:

I found it in the was trying to assign the datasource at the wrong time.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.