Solved

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

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
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…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now