Ejemplo n.º 1
0
 protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (Request.QueryString["menu"] == "5")
     {
         DetailsView5.Focus();
         this.DetailsView5.ChangeMode(DetailsViewMode.ReadOnly);
     }
     if (Request.QueryString["menu"] == "4")
     {
         DetailsView2.Focus();
         this.DetailsView2.ChangeMode(DetailsViewMode.ReadOnly);
     }
     if (Request.QueryString["menu"] == "3")
     {
         DetailsView1.Focus();
         this.DetailsView1.ChangeMode(DetailsViewMode.ReadOnly);
     }
     if (Request.QueryString["menu"] == "2")
     {
         DetailsView3.Focus();
         this.DetailsView3.ChangeMode(DetailsViewMode.ReadOnly);
     }
     if (Request.QueryString["menu"] == "1")
     {
         DetailsView4.Focus();
         this.DetailsView4.ChangeMode(DetailsViewMode.ReadOnly);
     }
 }
Ejemplo n.º 2
0
 protected void DetailsView_ItemCommand(object sender, DetailsViewCommandEventArgs e)
 {
     #region ItemCommand Action
     if (e.CommandName == "Clear")
     {
         GridView1.SelectedIndex = -1;
         DetailsView1.DataBind();
         DetailsView2.DataBind();
         DetailsView3.DataBind();
         DetailsView4.DataBind();
         DetailsView5.DataBind();
     }
     if (e.CommandName == "Update")
     {
         DetailsView dv = (DetailsView)sender;
         WriteToLabel("new", "Blue", dv.ID + " Update Processed [" + DateTime.Now.ToString("HH:mm:ss") + "]<br />", dtlLabel);
     }
     //dtlLabel.Text = e.CommandName;
     #endregion ItemCommand Action
 }
Ejemplo n.º 3
0
 protected void DetailsView1_ModeChanged(object sender, EventArgs e)
 {
     if (Request.QueryString["menu"] == "5")
     {
         DetailsView5.Focus();
     }
     if (Request.QueryString["menu"] == "4")
     {
         DetailsView2.Focus();
     }
     if (Request.QueryString["menu"] == "3")
     {
         DetailsView1.Focus();
     }
     if (Request.QueryString["menu"] == "2")
     {
         DetailsView3.Focus();
     }
     if (Request.QueryString["menu"] == "1")
     {
         DetailsView4.Focus();
     }
 }