private void obtenerItalikas() { BRANCHBITEntities ee = new BRANCHBITEntities(); gvItalikas.DataSource = ee.BuscarItalika(0, tbBuscar.Text); gvItalikas.DataBind(); dvItalikas.Visible = false; detalle.Visible = false; }
protected void gvItalikas_SelectedIndexChanged(object sender, EventArgs e) { //ver el seleccionado BRANCHBITEntities ee = new BRANCHBITEntities(); gvItalikas.Rows[((GridView)sender).SelectedIndex].BackColor = Color.Aqua; detalle.Visible = true; dvItalikas.ChangeMode(DetailsViewMode.ReadOnly); dvItalikas.Visible = true; dvItalikas.Focus(); dvItalikas.DataSource = ee.BuscarItalika(Int32.Parse(((GridView)sender).SelectedDataKey.Value.ToString()), ""); dvItalikas.DataBind(); }
protected void dvItalikas_ModeChanging(object sender, DetailsViewModeEventArgs e) { BRANCHBITEntities ee = new BRANCHBITEntities(); if (gvItalikas.SelectedDataKey != null) { ((DetailsView)sender).ChangeMode(e.NewMode); ((DetailsView)sender).DataSource = ee.BuscarItalika(Int32.Parse(gvItalikas.SelectedDataKey.Value.ToString()), ""); ((DetailsView)sender).DataBind(); } else { ((DetailsView)sender).Visible = false; } }