?
Solved

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

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

752 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