C# Programming
03-04-2010, 01:53 AM
Gentleman,
I have an application that stacks a series of tab pages. On one tabbed page that has a Data Grid, I have a select link that extracts data from the Grid View and uses it to run an SQL query and then loads the information into a form that is in another tabbed page. To view this page automatically, I am using the following code:
string thisItem = string.Empty;
//This information is derived from the Data Grid on tabControlA
//Get the Row Number from the Grid View
int row = this.dataGridView1.CurrentCell.RowIndex;
//Get the Value from the Id column, check for null, create parameter
if (this.dataGridView1["Id", row].Value.ToString() != "")
{
thisItem = this.dataGridView1["Id", row].Value.ToString();
}
//Run SQL query to get the data
MethodA(thisItem);
//View the information on a different Tabbed Page
tabControlB.BringToFront();
tabControlB.SelectTab(1);
It seems I used this code before, but now I cannot get control tabControl B to load on top. I have tried loading the tabControl from both inside and outside (pictured) the Method. I have done a line by line debug and there are no errors.....just no results...any ideas? Thank you, Pat
I have an application that stacks a series of tab pages. On one tabbed page that has a Data Grid, I have a select link that extracts data from the Grid View and uses it to run an SQL query and then loads the information into a form that is in another tabbed page. To view this page automatically, I am using the following code:
string thisItem = string.Empty;
//This information is derived from the Data Grid on tabControlA
//Get the Row Number from the Grid View
int row = this.dataGridView1.CurrentCell.RowIndex;
//Get the Value from the Id column, check for null, create parameter
if (this.dataGridView1["Id", row].Value.ToString() != "")
{
thisItem = this.dataGridView1["Id", row].Value.ToString();
}
//Run SQL query to get the data
MethodA(thisItem);
//View the information on a different Tabbed Page
tabControlB.BringToFront();
tabControlB.SelectTab(1);
It seems I used this code before, but now I cannot get control tabControl B to load on top. I have tried loading the tabControl from both inside and outside (pictured) the Method. I have done a line by line debug and there are no errors.....just no results...any ideas? Thank you, Pat