Populating a DataTable from a BindingSource
Posted on 2009-07-06
Hi, I'm using VB 2005, WinForms. I have several DataGridViews in my application and I populated them with a BindingSource. That all works well.
I now need to create some reports using ReportViewer, but ReportViewer gets its feed from a DataSet, which in turn contains a DataTable.
What I'd like to do is use my BindingSouce to populate my Report's DataTable.
Something like this (although I know this won't work)...
DataTable1.DataSource = bs << I know this is not correct, but its what I'd like to do.
Is there a way to do this, or do I need to simply poplate a new DataTable from a DataAdapter, CommandBuilder...etc? (I'd really dislike redoing all that)
Thanks for the help and advice,