Ejemplo n.º 1
0
    protected void gvTurnos_RowEditing(object sender, GridViewEditEventArgs e)
    {
        try
        {
            gvTurnos.EditIndex = e.NewEditIndex;

            int     id  = Convert.ToInt32(gvTurnos.DataKeys[e.NewEditIndex].Value);
            DataRow row = gTurnos.getTablaTurnos(id);

            cargarGridView();

            DropDownList combo = gvTurnos.Rows[e.NewEditIndex].FindControl("ddlEstado") as DropDownList;

            combo.SelectedValue = Convert.ToString(row["estado"]);
        }
        catch (Exception ex)
        {
            throw;
        }
    }