protected void btnSubLocSelect_Click(object sender, EventArgs e)
 {
     txtSubLocCode.Text  = GridViewSubLoc.GetRowValues(GridViewSubLoc.FocusedRowIndex, "PartsSubLocCode").ToString();
     txtSubCodeDesc.Text = GridViewSubLoc.GetRowValues(GridViewSubLoc.FocusedRowIndex, "PartsSubLocDesc").ToString();
     txtSubLocCode_TextChanged(txtSubLocCode, EventArgs.Empty);
     PopupControlSubLocLookup.ShowOnPageLoad = false;
 }
        protected void btnSubLocLookup_Click(object sender, EventArgs e)
        {
            if (txtLocCode.Text.Trim() == "")
            {
                lblMSG.Text = "Please select main code";
                PopupControlMSG.ShowOnPageLoad = true;
                txtLocCode.Focus();
                return;
            }

            PopupControlSubLocLookup.ShowOnPageLoad = true;
            SqlDataSourceSubLoc.SelectCommand       = "select * from PartsSubLocation where PartsLocCode='" + txtLocCode.Text + "'";
            SqlDataSourceSubLoc.Select(DataSourceSelectArguments.Empty);
            GridViewSubLoc.Visible = true;
            GridViewSubLoc.DataBind();
        }