Solved

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

Posted on 2008-10-02
2
1,319 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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

733 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