Solved

"'System.Data.DataRow' does not contain a property" when using datatable.Select()

Posted on 2008-10-02
2
1,314 Views
Last Modified: 2013-11-07
When using a repeater bound to an array of DataRows, <% Container.DataItem("MyColumn") %> works but <% DataBinder.Eval(Container.DataItem, "MyColumn", "{0:0.00000}") %> gives the error: DataBinder.Eval: 'System.Data.DataRow' does not contain a property with the name MyColumn. I'm generating the array of DataRows with

Dim dr As DataRow() = Me.MyTable.Select("TypeID = " & intTypeID)

How can I write my aspx markup so I can still format MyColumn as a decimal value? Do I have to use the Format function or do I have to cast the DataItem value before formatting it with Eval?

By the way, this is for ASP.NET 1.1. Thanks in advance.
0
Comment
Question by:ZekeLA
2 Comments
 
LVL 22

Accepted Solution

by:
prairiedog earned 125 total points
ID: 22627084
Try adding parenthesis around "myColumn" ===>"(myColumn)"
0
 
LVL 1

Author Comment

by:ZekeLA
ID: 22627646
Hurrah! That did it.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
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…

831 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