Hi guys i have a 5 tabs and with in each of the tabs i have a grid. When i click on the tab the grid does not load. It loads when i click.
Does anyone know how i get a grid to load when i click on the tab.
Tab load Grid
Page 1 of 110 Replies - 319 Views - Last Post: 03 October 2012 - 03:21 AM
Replies To: Tab load Grid
#2
Re: Tab load Grid
Posted 01 October 2012 - 09:04 AM
Without seeing your code, I would say the way to get the grid to load is by having code in the tab to handle the click event for the tab.
Personally, though, the way I've dealt with the tab control in the past was to use the events surrounding a tab being selected, rather than the click events. Some folks still use the keyboard, you know.
Personally, though, the way I've dealt with the tab control in the past was to use the events surrounding a tab being selected, rather than the click events. Some folks still use the keyboard, you know.
This post has been edited by Skydiver: 01 October 2012 - 09:04 AM
#3
Re: Tab load Grid
Posted 01 October 2012 - 12:35 PM
Quote
When i click on the tab the grid does not load. It loads when i click.
If you can't figure out whether or not it loads when you click, then what are we supposed to work with?
#4
Re: Tab load Grid
Posted 01 October 2012 - 09:59 PM
inkey, on 01 October 2012 - 08:52 AM, said:
Hi guys i have a 5 tabs and with in each of the tabs i have a grid. When i click on the tab the grid does not load. It loads when i click.
Does anyone know how i get a grid to load when i click on the tab.
Does anyone know how i get a grid to load when i click on the tab.
It is hard to understand your question saying it does not load when you click the tab but loads when you click. Click what?
It would be better to rephrase your question and send us more details about what you are trying to do.
#5
Re: Tab load Grid
Posted 02 October 2012 - 12:40 AM
My guess: "It doesn't load when I click the tab, but loads when I click the DataGridView".
Take the code from your DGV click event and put it into the tab's selected event.
Take the code from your DGV click event and put it into the tab's selected event.
#6
Re: Tab load Grid
Posted 02 October 2012 - 01:45 AM
Sorry if my question did not make any sense.
I have created a number of different tabs. Inside each tab i have placed a grid. The grid does not load when the tab has been selected. The grid will only appear on a click event. Is there a way to make a grid load when a tab has been selected.
I have created a number of different tabs. Inside each tab i have placed a grid. The grid does not load when the tab has been selected. The grid will only appear on a click event. Is there a way to make a grid load when a tab has been selected.
#7
Re: Tab load Grid
Posted 02 October 2012 - 02:06 AM
See if you can look at the MSDN page for TabControl Class and find an event you could use...
#8
Re: Tab load Grid
Posted 02 October 2012 - 02:19 AM
MrShoes, on 02 October 2012 - 02:06 AM, said:
See if you can look at the MSDN page for TabControl Class and find an event you could use...
Theres no event for load on tab click?
#10
Re: Tab load Grid
Posted 03 October 2012 - 01:13 AM
This is what i have for my selected index and i have set the event to hit this method. This still does not load the grid even tho the selected index is == 0
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
{
// Code to run when SelectedIndex changes
if (goodproducttab.SelectedIndex == 0 )
{
GoodProductGrid_Load(sender, e);
}
}
#11
Re: Tab load Grid
Posted 03 October 2012 - 03:21 AM
Turns out that because im using a outside datagrid control not the standard one that comes with windows that is what is causing the problem.
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote






|