Troubleshooting databinding issue

Posted on 2011-09-21
Last Modified: 2012-05-12
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

Question by:knowlton
LVL 14

Accepted Solution

binaryevo earned 500 total points
ID: 36574430
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.

Author Closing Comment

ID: 36574478

I found it in the was trying to assign the datasource at the wrong time.

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SSRS ReportViewer report timeout 7 122 Run 3 sliders vertically as opposed to horizontally 9 21
Need a starter for ETL protocol? 4 55
imap read mail 1 27
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question