TabControl Need OnClick event
Posted: Thu Jul 25, 2019 5:14 am
Hello, I have a form with Tabcontrol and 5 tabs. In each of the tabs I have a separate DataGridview control with different data displayed on each.
I need to be able to click on a different tab in the gui, and have the data displayed. Right now only if you click on the tab *page* [area] does the datagridview display the data.
I have tried this, but it doesn't work:
if ($tabcontrol1.SelectedTab = $tabcontrol1.TabPages[1])
{
# Some code (i.e., Update-DataGridView -DataGridView $datagridview1 -Item $table -AutoSizeColumns DisplayedCells)
}
Doesn't seem right to tell users of the app to "just click the page area of the tab/gui to get the data to display"?
Any help would be appreciated.
Thanks,
Mark
I need to be able to click on a different tab in the gui, and have the data displayed. Right now only if you click on the tab *page* [area] does the datagridview display the data.
I have tried this, but it doesn't work:
if ($tabcontrol1.SelectedTab = $tabcontrol1.TabPages[1])
{
# Some code (i.e., Update-DataGridView -DataGridView $datagridview1 -Item $table -AutoSizeColumns DisplayedCells)
}
Doesn't seem right to tell users of the app to "just click the page area of the tab/gui to get the data to display"?
Any help would be appreciated.
Thanks,
Mark