?
Solved

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

Posted on 2008-10-02
2
Medium Priority
?
1,355 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 500 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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

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…
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 …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month16 days, 9 hours left to enroll

862 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