0

I have a tab control with three tabs and I have added a datagridview to each of the first two tabs at design time. Programatically, when the second tab is selected, I am attempting to create columns and add them to the datagridview on the second tab. However, they show up in the datagridview on the first tab. I can't figure out what I'm doing wrong; if I step through the code I can see that the selected tab is the correct tab (the second one). Any suggestions?

3
Contributors
3
Replies
10
Views
4 Years
Discussion Span
Last Post by spowel4
0

Without seeing your code, i'd just be guessing that you are adding it to the wrong datagrid.

0

I agree.. Make sure you're focussed on the correct datagridview. If this is the case just do a simple test by removing the grid on tab 1 and tab 3 and check if it adds to the grid on tab 2. Crude but effective.

0

Well I feel like an idiot, you guys were correct; I had a typo that was causing things to add to the wrong grid. Thanks for the help.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.