Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Troubleshooting databinding issue

Posted on 2011-09-21
2
Medium Priority
?
177 Views
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">
<Columns>
<asp:BoundField DataField="ISBN" HeaderText="ISBN" Visible="False" />
<asp:TemplateField HeaderText="Item Description">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Title") %>'></asp:TextBox>
</EditItemTemplate>
<HeaderStyle CssClass="Title_HeaderStyle" />
<ItemStyle CssClass="Title_ItemStyle" />
<ItemTemplate>
<asp:Label EnableViewState="false" ID="Label1" runat="server" Text='<%# Bind("Title") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="DETAILS" HeaderText="Details">
<HeaderStyle CssClass="Details_HeaderStyle" />
<ItemStyle CssClass="Details_ItemStyle" />
</asp:BoundField>
<asp:BoundField DataField="TYPE" HeaderText="Type">
<HeaderStyle CssClass="Type_HeaderStyle" />
<ItemStyle CssClass="Type_ItemStyle" />
</asp:BoundField>
<asp:BoundField DataField="Price" HeaderText="Price">
<HeaderStyle CssClass="Price_HeaderStyle" />
<ItemStyle CssClass="Price_ItemStyle" />
</asp:BoundField>
<asp:BoundField DataField="QTY" HeaderText="Qty">
<HeaderStyle CssClass="Qty_HeaderStyle" />
<ItemStyle CssClass="Qty_ItemStyle" />
</asp:BoundField>
<asp:BoundField DataField="Extended" HeaderText="Ext">
<HeaderStyle CssClass="Extended_HeaderStyle" />
<ItemStyle CssClass="Extended_ItemStyle" />
</asp:BoundField>
</Columns>
</asp:GridView>

Open in new window

0
Comment
Question by:Tom Knowlton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 14

Accepted Solution

by:
binaryevo earned 2000 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.
0
 
LVL 5

Author Closing Comment

by:Tom Knowlton
ID: 36574478
thx


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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
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…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

650 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