473,405 Members | 2,176 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

'System.Data.DataRowView' does not contain a property ......

I am trying to bind two tables to two different list boxes

Ther tables are working as I use them on another page wth no problems

The code is as follows...

private void Page_Load(object sender, System.EventArgs e

oleDbDataAdapter2.Fill( dataSet1)
oleDbDataAdapter4.Fill( dataSet1)

listVersion.DataSource = dataSet1
listVersion.DataTextField = "version"
listVersion.DataValueField = "version"
listVersion.DataBind()

listMerchant.DataSource = dataSet1
listMerchant.DataTextField = "merchant"
listMerchant.DataValueField = "merchant"
listMerchant.DataBind()
the merchant one works fine, the versions one returns..

DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with the name version.

both adapters are created the same way and work fine on another page (the versions table is working as expected). I don't think its a problem with the db. If I remove the listVersion.Bind(); it will compile and run loading only the merchants list of course..

I know this is probably not enough info, but maybe other people have seen this and can point to the right direction

thanks so much !!
Nov 18 '05 #1
2 2199
Hi,

the data is in two separate tables in the DataSet. You need to distinguish
the table to use when databinding. For example:

listVersion.DataSource = dataSet1.Tables[0];
....
listMerchant.DataSource = dataSet1.Tables[1];

not sure which way it should be as I know nothing about your data/database.
You can give tables a name when calling Fill method and access table with
that name via DataSet's Tables property.

oleDbDataAdapter2.Fill( dataSet1,"Table1");
oleDbDataAdapter4.Fill( dataSet1,"Table2");

and then respectively:

listVersion.DataSource = dataSet1.Tables["Table1"];
....
listMerchant.DataSource = dataSet1.Tables["Table2"];

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"etropic" <an*******@discussions.microsoft.com> wrote in message
news:3B**********************************@microsof t.com...
I am trying to bind two tables to two different list boxes.

Ther tables are working as I use them on another page wth no problems.

The code is as follows....

private void Page_Load(object sender, System.EventArgs e)
{
oleDbDataAdapter2.Fill( dataSet1);
oleDbDataAdapter4.Fill( dataSet1);

listVersion.DataSource = dataSet1;
listVersion.DataTextField = "version";
listVersion.DataValueField = "version";
listVersion.DataBind();

listMerchant.DataSource = dataSet1;
listMerchant.DataTextField = "merchant";
listMerchant.DataValueField = "merchant";
listMerchant.DataBind();
}
the merchant one works fine, the versions one returns...

DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with the name version.
both adapters are created the same way and work fine on another page (the versions table is working as expected). I don't think its a problem with the
db. If I remove the listVersion.Bind(); it will compile and run loading
only the merchants list of course...
I know this is probably not enough info, but maybe other people have seen this and can point to the right direction ?
thanks so much !!

Nov 18 '05 #2
great ! I will look into that

I thought though that was only true with UNTyped dataSet, and I am using a Typed DataSet

thanks again !
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: GeraldBauer | last post by:
I am experiencing some weird behaviors with the listbox and dataview. Here is a boiled down code snippet of what I am trying to do. <snippet> string MENUID = "MenuId" , ITEM = "Item" ,...
4
by: emma middlebrook | last post by:
Hi Straight to the point - I don't understand why System.Array derives from IList (given the methods/properties actually on IList). When designing an interface you specify a contract. Deriving...
3
by: John Hoge | last post by:
I have a datagrid that needs to display information from a related table, and I have use a template column to pass the Container.DataItem object to a method called ShowPub as follows: ...
5
by: karim | last post by:
I am getting the error below when I try to use DataRowView in my aspx page. I am using the System.Data in my code behind. I even tried importing system.Data in the aspx. I have to qualify it with...
0
by: MS | last post by:
I am very new to asp.net. Please help me in resolving the error: DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with the name RENEW_EXIST. I get the above error with the...
2
by: Georg Mayer | last post by:
Hi, I am trying to display data from a DataSet in a Repeater Control. My item-template (just an example) is like this: <ItemTemplate> <td> <asp:Label Runat="server" Text='<%#...
0
by: Michał Januszczyk | last post by:
Is it possible somehow to retreive {data Key Value} based on clicked {datagrid item index} ? Now i'm trying to do this in the following way, but with no effect. Now, Instead of getting value...
3
by: John | last post by:
I'm getting this error when i'm trying to databind my dataset to a dropdown: DataBinding: 'System.Data.DataRowView' does not contain a property with the name '12/12/2003' but if I do a...
2
by: arupasna | last post by:
I am working with datagrid while adding new row in Datagrid getting following problem pls help me out of this problem DataBinding: 'System.Data.DataRowView' does not contain a property with...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.