I have a datatable out of dataset like
Dim dt as datatable = dsDB.Tables(0)
UltraDataSource.... = dt
How can I do this?
There's no quick method to do this, you would have to copy all of the data by looping through every row.
But why would you want to do this?
What do you recomend to do this? I have all my Data in a DataTable and I can't change this because it is not my project and it is working in production, I just need tkae the data from the DataTable and fill my UltraDataSource to use in another thing.
Thanks.
I don't really understand what you are asking. You have a grid that's bound to a DataTable and you want to copy the data from that DataTable into an UltraDataSource to use it somewhere else? That would simply be a matter of duplicating the structure, so you would loop through the columns in the DataTable and then add a column to the UltraDataSource with the same DataType for each one. Then you would loop through the rows of the DataTable and for each one, add a row to the UltraDataSource. But you could just as easily (and probably more easily) do the same thing and copy the data into another DataTable. Either way, the data will not stay in synch, so it might be a better idea to simply use the same DataTable your original grid is bound to... depending on what you want to do.