I need to save each row created in the “Generate Data Table” in a variable. For the moment I have managed to display the values that are saved in the table but I have managed to paint it on the screen by making an indexed call to each column (within each row).
This may be against me because you may find rows where the “item (8) .tostring” does not exist and the code breaks,
Is there a way to make a single call for each line instead of concatenating each column?
A datarow contains many columns, if you were looking for the values represented in each column, you can get it inside the for each loop by:
item(“ColName”).ToString
When you print item.ToString, it represents the DataRow object and might not provide the individual values you’re looking for.
I understand that your proposal: element (“ColName”). ToString would result in the saved values for that column but in my case I want to recover the saved values for the whole row.
What function or syntax is optimal to obtain this result?
Currently my “itemArray” is in “Datatable” format and to be able to use the instruction that you have requested, it must be in System.Data.DataRow format.
Finally I have not yet been able to solve this problem. sample.xaml (15.4 KB)
I have been reviewing information about this functionality but not in this way I get the values making a single call instead of: item (0) .toString + “” + item (1) .toString + “” item (2) .toString … .
Attached I am sending you the .xaml with the code section in question and an image capture for you to understand with the results of String.Join (“”, test1).
Thank you very much in advance, I will appreciate any proposal.
Unfortunately this is not the solution. The composition of the function has been understood with its previous message but it is not accepted as valid.
If I write “test1” it gives me an error but if I only write “test” it accepts it as valid … it is as if I detect it as another optional parameter of the function.
Attached is an error capture.
Thank you very much for your involvement in solving this error.