By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,899 Members | 1,066 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,899 IT Pros & Developers. It's quick & easy.

Strange behaviour in dataview

P: n/a
Hi all,

I have a strange behaviour in dataview, maybe you can help me.
the behaviour is like this :

First I made a datatable (odt) in data set, and then I created a
dataview using this datatable. I added a row to data table by using
(let say the dataview created is odv) odv.table.rows.add(odr). When i
saw in first datatable (odt), there was no rows and when I saw in
odv.table.rows.count there was a row.

So how it can be?

Any one of you can explain why this happens?

Thanks in advance
wirawan.

Nov 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi

I could not find such a problem.

Try the following code

DataSet myDs = new DataSet();
DataTable myTable = new DataTable();
myDs.Tables.Add(myTable);
DataView myDv = new DataView(myTable);
myDv.Table.Rows.Add(myDv.Table.NewRow());

Here myDv.Table.Rows.Count
and myTable.Rows.Count returned 1.

Can you post the code.

Manoj

"ig****@gmail.com" wrote:
Hi all,

I have a strange behaviour in dataview, maybe you can help me.
the behaviour is like this :

First I made a datatable (odt) in data set, and then I created a
dataview using this datatable. I added a row to data table by using
(let say the dataview created is odv) odv.table.rows.add(odr). When i
saw in first datatable (odt), there was no rows and when I saw in
odv.table.rows.count there was a row.

So how it can be?

Any one of you can explain why this happens?

Thanks in advance
wirawan.

Nov 17 '05 #2

P: n/a
Hi,

Weird indeed, dataview.Table gets you a reference to the table itself,

could you post some code? I bet the problem is somewhere else

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

<ig****@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Hi all,

I have a strange behaviour in dataview, maybe you can help me.
the behaviour is like this :

First I made a datatable (odt) in data set, and then I created a
dataview using this datatable. I added a row to data table by using
(let say the dataview created is odv) odv.table.rows.add(odr). When i
saw in first datatable (odt), there was no rows and when I saw in
odv.table.rows.count there was a row.

So how it can be?

Any one of you can explain why this happens?

Thanks in advance
wirawan.

Nov 17 '05 #3

P: n/a
i still dont get it, how it can be?
but now everything is fine.

thanks to all of you, for the response.

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 17 '05 #4

P: n/a
i still don't get it, how it can be?
but now everything is fine, wiht out knowing what i have done to fix it.

thanks to all of you, for the response.

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Nov 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.