Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27513

add datasource to dynamically created DataGridView

$
0
0
Hello,

In my form I am dynamically creating a tabcontrol with various tabpages.
each tabpage has a dynamically created DataGridView.
If the tab page is called 'page1' the DataGridview is also called 'page1'

I want to set the data source of the DataGridViews but have no idea how to go about it.

I can't use page1.datasource = ds.tables("mytable") because the DataGridView doesn't yet exist!

if anyone can point me in the right direction of how to assign the data source to the DataGridViews i would greatly appreciate it!

Thanks

Viewing all articles
Browse latest Browse all 27513

Trending Articles



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