//RadListBox
        public void LlenaListBox(Int32 Id1, Int32 Id2, string conexion, string SP, ref Telerik.Web.UI.RadListBox RadListBox)
        {
            try
            {
                System.Collections.Generic.List <Comun> Lista = new System.Collections.Generic.List <Comun>();
                CapaDatos.CD__Comun claseCapaDatos            = new CapaDatos.CD__Comun();
                claseCapaDatos.LlenaCombo(Id1, Id2, SP, conexion, ref Lista);

                if (Lista.Count > 0)
                {
                    RadListBox.DataSource     = Lista;
                    RadListBox.DataValueField = "Id";
                    RadListBox.DataTextField  = "Descripcion";
                    RadListBox.DataBind();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Beispiel #2
0
 protected override void CreateChildControls()
 {
     ctrl    = new Telerik.Web.UI.RadListBox();
     ctrl.ID = "ctrl";
     Controls.Add(ctrl);
 }