I have a grid that I have hidden until there are more than one record in the grid. If there is more than one it will show the grid. The problem is I need this grid to be brought to the front after it is made visible. Anyone know the code for that?
dqa.BOConnect();
QueryExecutionDataSet qeds = dqa.GetQueryExecutionParametersByID("GS_Order_Detail_ParamsPO");
qeds.ExecutionParameter.Clear();
qeds.ExecutionParameter.AddExecutionParameterRow("POParam", txtOrderHed_PONum.Text, "nvarchar", false, Guid.NewGuid(), "A");
dqa.ExecuteByID("GS_Order_Detail_ParamsPO", qeds);
gridPOResults.DataSource = dqa.QueryResults.Tables["Results"];
{
if (dqa.QueryResults.Tables["Results"].Rows.Count <= 1)
{
gridPOResults.Visible = false;
}
else
{
MessageBox.Show("Select the PO you are searching for.");
gridPOResults.Visible = true;
gridPOResults.Focus();
}
}