S
Shock
Anybody ever tried to assign certain values in one datarow to certain
locations in another datarow?
Here is my code to this pont. Followed by the output from the command
window in vs.net debugging mode.
targetRow[0].BeginEdit();
targetRow[0].ItemArray[grwFSAIndex] = dr.ItemArray[fsaIndex];
targetRow[0].ItemArray[grwFSAFieldIndex] = dr.ItemArray[fsaFieldIndex];
targetRow[0].ItemArray[grwFSATractIndex] = dr.ItemArray[fsaTractIndex];
targetRow[0].EndEdit();
Output:
dr.ItemArray
{Length=6}
[0]: "83"
[1]: "91667"
[2]: "1234"
[3]: "56"
[4]: "7"
[5]: "4"
targetRow[0].ItemArray
{Length=12}
[0]: "Name"
[1]: {83}
[2]: "Other Name"
[3]: "The name"
[4]: {14544}
[5]: {91667}
[6]: "WY"
[7]: "Vincent"
[8]: {4.78}
[9]: ""
[10]: ""
[11]: ""
As you can see, after the assignment the columns 9 to 11 on targetRow should
be set to the values 2 to 4 on dr. The column variable numbers are correct
in my code, but for some reason I cannot get the values to be assigned.
Thanks ahead,
Shock
locations in another datarow?
Here is my code to this pont. Followed by the output from the command
window in vs.net debugging mode.
targetRow[0].BeginEdit();
targetRow[0].ItemArray[grwFSAIndex] = dr.ItemArray[fsaIndex];
targetRow[0].ItemArray[grwFSAFieldIndex] = dr.ItemArray[fsaFieldIndex];
targetRow[0].ItemArray[grwFSATractIndex] = dr.ItemArray[fsaTractIndex];
targetRow[0].EndEdit();
Output:
dr.ItemArray
{Length=6}
[0]: "83"
[1]: "91667"
[2]: "1234"
[3]: "56"
[4]: "7"
[5]: "4"
targetRow[0].ItemArray
{Length=12}
[0]: "Name"
[1]: {83}
[2]: "Other Name"
[3]: "The name"
[4]: {14544}
[5]: {91667}
[6]: "WY"
[7]: "Vincent"
[8]: {4.78}
[9]: ""
[10]: ""
[11]: ""
As you can see, after the assignment the columns 9 to 11 on targetRow should
be set to the values 2 to 4 on dr. The column variable numbers are correct
in my code, but for some reason I cannot get the values to be assigned.
Thanks ahead,
Shock