示例#1
0
        protected void grid_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
        {
            if (e.Column.FieldName == "LanguageID")
            {
                if (grid.IsNewRowEditing)
                {
                    e.Editor.ReadOnly = false;
                }
                else
                {
                    e.Editor.ReadOnly = true;
                }
            }
            else if (e.Column.FieldName == "ColorID")
            {
                if (grid.IsNewRowEditing)
                {
                    e.Editor.ReadOnly = false;
                }
                else
                {
                    e.Editor.ReadOnly = true;
                }
            }


            if (e.Editor is ASPxComboBox)
            {
                e.Editor.Width = 200;
            }
        }
示例#2
0
 protected void ASPxGridView1_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
 {
     if (e.Column.FieldName == "customer_part" && (sender as ASPxGridView).IsNewRowEditing)
     {
         e.Editor.ReadOnly = false;
     }
 }
示例#3
0
 protected void Grd_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
 {
     if (e.Column.FieldName == "NAME_DVIQLY")
     {
         e.Editor.Focus();
     }
 }
示例#4
0
 protected void gridLinkedImportTbl_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
 {
     if (e.Column.FieldName == "ltpk")
     {
         e.Editor.ReadOnly = false;
     }
 }
示例#5
0
 protected void generic_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
 {
     if (e.Column.FieldName != "nothing")
     {
         e.Editor.ReadOnly = false;
     }
 }
示例#6
0
 protected void gvStudents_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
 {
     if (e.Column.Name == "examsMarks")
     {
         ASPxSpinEdit ts = (ASPxSpinEdit)e.Editor; ts.MaxValue = int.Parse(new InstanceConfigServices().GetConfig("examshigerscore"));
     }
 }
示例#7
0
 protected void ASPxGridView1_AutoFilterCellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
 {
     if (e.Column.FieldName == "CustomerID")
     {
         e.Editor.ClientInstanceName = e.Column.FieldName;
     }
 }
        protected void dxGridColaborador_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
        {
            DataTable dt = new DataTable();

            dt.Columns.Add("idCargo");
            dt.Columns.Add("cargo");


            ServicioColaborador.ServicioColaboradorClient sercivio_colaborador = new ServicioColaborador.ServicioColaboradorClient();



            DataTable dt2 = new DataTable();

            dt2.Columns.Add("idCargo");
            dt2.Columns.Add("cargo");

            if (e.Column.FieldName == "idCargo")
            {
                ASPxComboBox request = e.Editor as ASPxComboBox;
                request.ValueField = "idCargo";
                request.TextField  = "cargo";
                request.ValueType  = typeof(System.Int32);

                request.DataSource = sercivio_colaborador.ObtenerCargos();
                request.DataBindItems();
            }
        }
示例#9
0
        protected void Grid_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
        {
            //if (e.Column.FieldName == "ScoreCol1")
            //{
            //    GridViewColumn Score1 = gridScorecardWidget.Columns["ScoreCol1"];


            //    ASPxComboBox ComboHeader1 = new ASPxComboBox();
            //    ComboHeader1.ValueType = typeof(System.Int32);
            //    ComboHeader1.ID = "ComboHeader1";
            //    ComboHeader1.ClientEnabled = true;
            //    ComboHeader1.EnableClientSideAPI = true;
            //    ComboHeader1.ClientInstanceName = "ComboHeader1";
            //    ComboHeader1.ClientSideEvents.SelectedIndexChanged = "ScoreCol1";
            //    ComboHeader1.DropDownStyle = DropDownStyle.DropDown;
            //    //for (int z=0; z==5)
            //    //List<Int32> ds = new List<int>();

            //    //for (int i = 0; i <= 5; i++)
            //    //{
            //    //    ListEditItem ScoreItem = new ListEditItem(i.ToString(), i);
            //    //    ComboHeader1.Items.Insert(i, ScoreItem);
            //    //}
            //    List<Int32> ds = new List<int>();
            //    for (int i = 0; i < 5; i++)
            //    {
            //        ds.Add(i);
            //    }
            //    //ComboHeader1.DataBind();
            //    //ComboHeader1.Value = 1;

            //    GridViewFilterCellTemplateContainer ContainerScore1 = new GridViewFilterCellTemplateContainer(Score1);
            //    ContainerScore1.Controls.Add(ComboHeader1);
            //}
        }
 protected void PatientListGridView_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
 {
     try
     {
         e.Editor.ReadOnly = false;
         if (e.Column.Name == "colPrimaryPhysician")
         {
             ASPxComboBox cmb = e.Editor as ASPxComboBox;
             if (Session["PhysicianDS"] != null)
             {
                 cmb.DataSource = Session["PhysicianDS"];
                 cmb.DataBindItems();
             }
             else
             {
                 GetPhysicianList();
                 cmb.DataSource = Session["PhysicianDS"];
                 cmb.DataBindItems();
             }
         }
     }
     catch (Exception ex)
     {
         CommonHelpers.writeLogToFile("PatientListGridView_CellEditorInitialize: PatientList.aspx", ex.Message);
     }
 }
        protected void gvClassLessons_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
        {
            if (cmbProgram.GridView.FocusedRowIndex >= 0)
            {
                if (e.Column.Name == "lessonVenus")
                {
                    ASPxComboBox c = e.Editor as ASPxComboBox;

                    c.DataSource = new VenuroomsService().GetAllVenurooms(new SessionManager().GetUserId(Session));
                    c.DataBind();
                }

                if (e.Column.Name == "clLessonTime")
                {
                    ASPxComboBox c = e.Editor as ASPxComboBox;

                    c.DataSource = new LookUpService().GetTimePeriods();
                    c.DataBind();
                }

                if (e.Column.Name == "clLessonDay")
                {
                    ASPxComboBox c = e.Editor as ASPxComboBox;

                    c.DataSource = new LookUpService().GetTimeDays();
                    c.DataBind();
                }
            }

            uPanel.Update();
        }
示例#12
0
 protected void gridLinkedREDCapForm_CellEditorInitialize(object sender,
                                                          DevExpress.Web.ASPxGridViewEditorEventArgs e)
 {
     if (e.Column.FieldName == "redcapformID")
     {
         e.Editor.ReadOnly = false;
     }
 }
示例#13
0
 protected void ASPxGridView1_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
 {
     if (e.Editor is ASPxCheckBox)
     {
         ASPxCheckBox editor = (ASPxCheckBox)e.Editor;
         editor.ClientSideEvents.CheckedChanged = "checkedChanged";
     }
 }
 protected void ASPxGridView1_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
 {
     if (e.Column.FieldName == "UserName" && ASPxGridView1.IsNewRowEditing)
     {
         e.Editor.ReadOnly = false;
     }
     else if (e.Column.FieldName=="UserName")
     { userName = (string) e.KeyValue; }
 }
 protected void grid_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
 {
     if (e.Column.FieldName == "Usuario")
     {
         int          c       = 0;
         ASPxComboBox cmb     = e.Editor as ASPxComboBox;
         SqlCommand   command = new SqlCommand("sp_perfilUsuario", connection);
         command.CommandType = System.Data.CommandType.StoredProcedure;
         command.Parameters.AddWithValue("@mode", 1);
         if (connection.State != ConnectionState.Open)
         {
             connection.Open();
         }
         SqlDataReader reader = command.ExecuteReader();
         while (reader.Read())
         {
             cmb.Items.Add(reader["Nombre"].ToString(), Int32.Parse(reader["ID"].ToString()));
             if (reader["Nombre"].ToString() == cmb.Text)
             {
                 cmb.SelectedIndex = c;
             }
             c++;
         }
         reader.Close();
         //if (cmb.Text == "") cmb.SelectedIndex = 0;
         //if (hdn_update.Value == "1")
         //    if (txtPerfil.Value != "") cmb.Text = txtPerfil.Value;
     }
     if (e.Column.FieldName == "Perfil")
     {
         int          c       = 0;
         ASPxComboBox cmb     = e.Editor as ASPxComboBox;
         SqlCommand   command = new SqlCommand("sp_perfilUsuario", connection);
         command.CommandType = System.Data.CommandType.StoredProcedure;
         command.Parameters.AddWithValue("@mode", 2);
         if (connection.State != ConnectionState.Open)
         {
             connection.Open();
         }
         SqlDataReader reader = command.ExecuteReader();
         while (reader.Read())
         {
             cmb.Items.Add(reader["Perfil"].ToString(), Int32.Parse(reader["ID"].ToString()));
             if (reader["Perfil"].ToString() == cmb.Text)
             {
                 cmb.SelectedIndex = c;
             }
             c++;
         }
         reader.Close();
         //if (cmb.Text == "") cmb.SelectedIndex = 0;
     }
     if (connection.State != ConnectionState.Closed)
     {
         connection.Close();
     }
 }
示例#16
0
 protected void permissionsGridView_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
 {
     if (e.Column.FieldName == "PermissionType")
     {
         var comboBox = e.Editor as ASPxComboBox;
         comboBox.DataSource = Enum.GetNames(typeof(PermissionType));
         comboBox.DataBind();
     }
 }
示例#17
0
 protected void GridBookingProcessView_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
 {
     if (e.Column.FieldName == "Status")
     {
         ASPxComboBox combo = (ASPxComboBox)e.Editor;
         combo.DataSource = Enum.GetValues(typeof(DocumentProcessStatus));
         combo.DataBind();
     }
 }
示例#18
0
 protected void gvBitacora_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
 {
     if (e.Column.FieldName == "NCF")
     {
         var grid = e.Column.Grid;
         if (!grid.IsNewRowEditing)
         {
             e.Editor.ReadOnly = true;
         }
     }
 }
示例#19
0
    protected void ASPxGridView1_AutoFilterCellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
    {
        if (e.Column.FieldName != "OrderDate")
        {
            return;
        }
        ASPxDateEdit ed = e.Editor as ASPxDateEdit;

        ed.TimeSectionProperties.Visible = true;
        ed.TimeSectionProperties.TimeEditProperties.EditFormatString = "hh:mm";
    }
示例#20
0
 protected void gridProjects_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
 {
     if (e.Column.FieldName == "MilestoneName")
     {
         ASPxComboBox cmb = e.Editor as ASPxComboBox;
         cmb.DataSource = common_services.GetMilestone();
         cmb.ValueField = "Name";
         cmb.ValueType  = typeof(String);
         cmb.TextField  = "Name";
         cmb.DataBindItems();
     }
 }
示例#21
0
        protected void dxGridUsuario_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
        {
            ServicioUsuario.ServiciosUsuarioClient sercivio_usuario = new ServicioUsuario.ServiciosUsuarioClient();
            if (e.Column.FieldName == "tipo_usuario")
            {
                ASPxComboBox request = e.Editor as ASPxComboBox;
                request.ValueField = "tipo_usuario";
                request.TextField  = "tipo_usuario_nombre";
                request.ValueType  = typeof(System.Int32);

                request.DataSource = sercivio_usuario.ObtenerTipoUsuario();
                request.DataBindItems();
            }
        }
示例#22
0
    protected void ASPxGridView1_AutoFilterCellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
    {
        if (e.Column.FieldName != "Month")
        {
            return;
        }
        ASPxComboBox comboBox = e.Editor as ASPxComboBox;

        comboBox.ValueType = typeof(string);
        for (int i = 1; i <= 12; i++)
        {
            comboBox.Items.Add(NumberMonthConverter.GetTitleOfMonth(i), i);
        }
    }
示例#23
0
        protected void dgOpcionesMenu_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
        {
            ASPxGridView grid = (ASPxGridView)sender;

            switch (e.Column.FieldName)
            {
            case "IdMenuHijo":
                InitializeCombo(e, "IdMenuPadre", ObtenerOpcionesHijo, cmbCombo2_OnCallback, grid);
                break;

            default:
                break;
            }
        }
示例#24
0
        protected void dgCotizacionDetalle_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
        {
            if (e.Column.FieldName == "IdServicio")
            {
                e.Editor.ClientInstanceName = "ServicioEditor";
            }
            if (e.Column.FieldName != "IdUnidadMedida")
            {
                return;
            }
            var editor = (ASPxComboBox)e.Editor;

            editor.ClientInstanceName           = "UnidadMedidaEditor";
            editor.ClientSideEvents.EndCallback = "UnidadMedida_EndCallback";
        }
示例#25
0
 protected void grvSeguranca_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
 {
     //***********************************
     //* Inclusão, alteração ou exclusão?
     //***********************************
     if (e.Column.FieldName == "inclusao" || e.Column.FieldName == "alteracao" || e.Column.FieldName == "exclusao")
     {
         //*************************************************
         //* Deve restringir acesso para permissão simples?
         //*************************************************
         if (oSecurity.IsSimpleGroupPermission(oLogin, Convert.ToInt32(e.KeyValue)))
         {
             e.Editor.ReadOnly      = true;
             e.Editor.ClientEnabled = false;
         }
     }
 }
示例#26
0
 protected void gridPM_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
 {
     if (e.Column.FieldName == "Type")
     {
         ASPxComboBox cmb = e.Editor as ASPxComboBox;
         cmb.DataSource = common_services.GetCustomDropDown("pm_type");
         cmb.ValueField = "Name";
         cmb.ValueType  = typeof(String);
         cmb.TextField  = "Description";
         cmb.DataBindItems();
     }
     if (e.Column.FieldName == "Priority")
     {
         ASPxComboBox cmb = e.Editor as ASPxComboBox;
         cmb.DataSource = common_services.GetCustomDropDown("pm_priority");
         cmb.ValueField = "Name";
         cmb.ValueType  = typeof(String);
         cmb.TextField  = "Description";
         cmb.DataBindItems();
     }
     if (e.Column.FieldName == "Status")
     {
         ASPxComboBox cmb = e.Editor as ASPxComboBox;
         cmb.DataSource = common_services.GetCustomDropDown("pm_status");
         cmb.ValueField = "Name";
         cmb.ValueType  = typeof(String);
         cmb.TextField  = "Description";
         cmb.DataBindItems();
     }
     if (e.Column.FieldName == "Area")
     {
         ASPxComboBox cmb = e.Editor as ASPxComboBox;
         cmb.DataSource = common_services.GetCustomDropDown("pm_area");
         cmb.ValueField = "Name";
         cmb.ValueType  = typeof(String);
         cmb.TextField  = "Description";
         cmb.DataBindItems();
     }
 }
示例#27
0
 protected void ASPxGridView1_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
 {
     if (e.Column.FieldName == "DYR_ID")
     {
         ASPxComboBox lObjPlantilla = e.Editor as ASPxComboBox;
         lObjPlantilla.Callback += LObjPlantilla_Callback;
         if (e.KeyValue != DBNull.Value)
         {
             int lintCodigoOrganizacion = Convert.ToInt32(ASPxGridView1.GetRowValuesByKeyValue(e.KeyValue, "Organizacion_ID"));
             SubBuscarPlantillas(lObjPlantilla, lintCodigoOrganizacion);
         }
     }
     if (e.Column.FieldName == "Municipio_ID")
     {
         ASPxComboBox lObjMunicipio = e.Editor as ASPxComboBox;
         lObjMunicipio.Callback += LObjMunicipio_Callback;
         if (e.KeyValue != DBNull.Value)
         {
             int lintCodigoDepartamento = Convert.ToInt32(ASPxGridView1.GetRowValuesByKeyValue(e.KeyValue, "Departamento_ID"));
             SubBuscarMunicipios(lObjMunicipio, lintCodigoDepartamento);
         }
     }
 }
示例#28
0
 protected void GridView_Asignaciones_AutoFilterCellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
 {
     try
     {
         if (e.Column.FieldName == "IdBeneficiario")
         {
             ASPxComboBox combo = (ASPxComboBox)e.Editor;
             combo.Buttons.Clear();
         }
     }
     catch (Exception Ex)
     {
         FG.Controlador_Error(Ex, Page.Response);
     }
 }
示例#29
0
 protected void grvData_AutoFilterCellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
 {
     Search();
 }
示例#30
0
 protected void membersGridView_CellEditorInitialize(object sender, DevExpress.Web.ASPxGridViewEditorEventArgs e)
 {
 }