Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

Dataview values

$
0
0
I am assigning a value to a dataview row and column which works fine on the first line but when I want to assign the value on the second line for a different column the row.index has changed. I need to assign both values and not sure why the row.index changes after assigning a value.  Thank You for your help.

line 1 row.Index = 0. When cursor is on line 2 then row.Index is -1.

'Line 1

dataView.Item(row.Index).Row("mycolumn1") = _dtFiscalYears.Rows(destinationTab)("SEQ_ID")

Line 2

dataView.Item(row.Index).Row("mycolumn2") = _dtFiscalYears.Rows(destinationTab)("NAME")


After doing some more testing, If I assign a string value, the row.Index does not change, it only changes when I assign a numeric value.

Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>