DataGrid in TabControl

Hi,

I have a tabControl (in a windows form) contains two tab pages. In the first tab page, there is a data grid. When I click and switch to the second tab page, I also want to see the same datagrid showing on this tab. How to do that  (I don't want to create datagrids for each individual tab page. What I want is a data grid sharing between different tab pages) 

Thanks for anyone's help. 


Answer this question

DataGrid in TabControl

  • WCO

    So, I used the alternative solution: move the data grid out, lay the tab control on top of it, and then bring the data grid to the front. It will make it looks like the data grid is in the tab control and each tab page can share this data grid. Thanks,
  • Sadun_Ozcelep

    Thanks for Jacob's reply.

    I understand that moving the data grid out of tabcontrol will be an alternative solution. But this is just one of the requirement in the project I am working on. Is there any way to let the data grid always stay on top of all other controls in the form

    Thanks,

  • dannyyyyyy

    Based on your description, it seems like a tabbed interface might not be the best approach.  I think that you might be better off creating something that kind of behaves like a tab control.  Or perhaps redesign the UI so that the datagrid is not a member of the tab pages but displayed outside of the tab control.  Perhaps if you could explain a little more "why" you need this setup, then we can offer a reasonable alternative
  • DataGrid in TabControl