当前位置: 首页>>代码示例>>C#>>正文


C# RadComboBoxItem.DataBind方法代码示例

本文整理汇总了C#中RadComboBoxItem.DataBind方法的典型用法代码示例。如果您正苦于以下问题:C# RadComboBoxItem.DataBind方法的具体用法?C# RadComboBoxItem.DataBind怎么用?C# RadComboBoxItem.DataBind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RadComboBoxItem的用法示例。


在下文中一共展示了RadComboBoxItem.DataBind方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RadComboBoxFirma_ItemsRequested

 protected void RadComboBoxFirma_ItemsRequested(object sender, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
 {
     if (e.Text.Length > 3)
     {
         string sqlSelectCommand = "";
         sqlSelectCommand = "SELECT [UserID],[UserName] from [telerik_Users] ORDER BY [UserName]";
         SqlDataAdapter adapter = new SqlDataAdapter(sqlSelectCommand, ConfigurationManager.ConnectionStrings["KalData"].ConnectionString);
         adapter.SelectCommand.Parameters.AddWithValue("@text", e.Text);
         DataTable dataTable = new DataTable();
         adapter.Fill(dataTable);
         RadComboBoxFirma.Items.Clear();
         foreach (DataRow dataRow in dataTable.Rows)
         {
             string UserName = "";
             RadComboBoxItem item = new RadComboBoxItem();
             item.Text = (string)dataRow["UserName"].ToString();
             item.Value = dataRow["UserId"].ToString();
             UserName = (string)dataRow["UserName"];
             if (dataRow["UserName"] != System.DBNull.Value)
             {
                 UserName = (string)dataRow["UserName"];
             }
             //item.Attributes.Add("FIRMAADI", FirmaAdi);
             //item.Attributes.Add("IL_ILCE", IlIlce);
             RadComboBoxFirma.Items.Add(item);
             item.DataBind();
         }
         Label lbl = (Label)RadComboBoxFirma.Footer.FindControl("lblBulunanKayitSayisi");
         lbl.Text = "Bulunan kayıt sayısı:" + "  " + dataTable.Rows.Count.ToString();
     }
 }
开发者ID:inancakcan,项目名称:kalibrasyon,代码行数:31,代码来源:PMessages.aspx.cs

示例2: CarregueCombo

 private void CarregueCombo()
 {
     foreach (EnumeradorFiltroPatente enumerador in EnumeradorFiltroPatente.ObtenhaTodos())
     {
         var item = new RadComboBoxItem(enumerador.Descricao, enumerador.Id.ToString());
         item.Attributes.Add("Codigo", enumerador.Id.ToString());
         cboFiltroPatente.Items.Add(item);
         item.DataBind();
     }
 }
开发者ID:ViniciusConsultor,项目名称:petsys,代码行数:10,代码来源:ctrlFiltroRevistaPatente.ascx.cs

示例3: CarregueCombo

        private void CarregueCombo()
        {
            foreach (var mes in Mes.ObtenhaTodas())
            {
                var item = new RadComboBoxItem(mes.Descricao, mes.Codigo.ToString());

                item.Attributes.Add("Codigo", mes.Codigo.ToString());

                cboMes.Items.Add(item);
                item.DataBind();
            }
        }
开发者ID:ViniciusConsultor,项目名称:petsys,代码行数:12,代码来源:ctrlMes.ascx.cs

示例4: CarregueCombo

        private void CarregueCombo()
        {
            foreach (var apresentacao in Apresentacao.ObtenhaTodas())
            {
                var item = new RadComboBoxItem(apresentacao.Nome, apresentacao.Codigo.ToString());

                item.Attributes.Add("Codigo", apresentacao.Codigo.ToString());

                cboApresentacao.Items.Add(item);
                item.DataBind();
            }
        }
开发者ID:ViniciusConsultor,项目名称:petsys,代码行数:12,代码来源:ctrlApresentacao.ascx.cs

示例5: cboTitular_OnItemsRequested

        protected void cboTitular_OnItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
        {
            using (var servico = FabricaGenerica.GetInstancia().CrieObjeto<IServicoDeTitular>())
            {
                cboTitular.Items.Clear();

                foreach (var titular in servico.ObtenhaPorNomeComoFiltro(e.Text, 50))
                {
                    var item = new RadComboBoxItem(titular.Pessoa.Nome, titular.Pessoa.ID.ToString());
                    item.Attributes.Add("DataDoCadastro", titular.DataDoCadastro.Value.ToString("dd/MM/yyyy"));
                    item.Attributes.Add("InformacoesAdicionais", titular.InformacoesAdicionais);
                    cboTitular.Items.Add(item);
                    item.DataBind();
                }
            }
        }
开发者ID:ViniciusConsultor,项目名称:petsys,代码行数:16,代码来源:ctrlTitular.ascx.cs

示例6: CarregueComboClasseViena

        private void CarregueComboClasseViena(ILeituraRevistaDeMarcas processo)
        {
            cboClassificacaoViena.Items.Clear();
            cboClassificacaoViena.Attributes.Clear();

            foreach (var codigo in processo.ClasseViena.ListaDeCodigosClasseViena)
            {
                var item = new RadComboBoxItem(processo.ClasseViena.EdicaoClasseViena, processo.ClasseViena.EdicaoClasseViena);

                item.Attributes.Add("Codigo",
                                    codigo ?? "Não informada");

                this.cboClassificacaoViena.Items.Add(item);
                item.DataBind();
            }
        }
开发者ID:ViniciusConsultor,项目名称:petsys,代码行数:16,代码来源:frmDetalhesLeituraDaRevista.aspx.cs

示例7: cboNCL_OnItemsRequested

        protected void cboNCL_OnItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
        {
            var ncls = NCL.ObtenhaPorCodigoComoFiltro(e.Text);

            if (ncls.Count > 0)
            {
                foreach (var ncl in ncls)
                {
                    var item = new RadComboBoxItem(ncl.Codigo, ncl.Codigo);

                    item.Attributes.Add("Descricao", ncl.Descricao);
                    item.Attributes.Add("Natureza", ncl.NaturezaDeMarca.Nome);

                    cboNCL.Items.Add(item);
                    item.DataBind();
                }
            }
        }
开发者ID:ViniciusConsultor,项目名称:petsys,代码行数:18,代码来源:ctrlNCL.ascx.cs

示例8: CarregueComboClasseNacional

        private void CarregueComboClasseNacional(ILeituraRevistaDeMarcas processo)
        {
            cboClassificacaoNacional.Items.Clear();
            cboClassificacaoNacional.Attributes.Clear();

            foreach (var codigo in processo.ClasseNacional.listaDeCodigosDeSubClasse)
            {
                var item = new RadComboBoxItem(processo.ClasseNacional.CodigoClasseNacional, processo.ClasseNacional.CodigoClasseNacional);

                item.Attributes.Add("Especificacao",
                                    processo.ClasseNacional.EspecificacaoClasseNacional ?? "Não informada");

                item.Attributes.Add("SubClasse",
                                    codigo ?? "Não informada");

                this.cboClassificacaoNacional.Items.Add(item);
                item.DataBind();
            }
        }
开发者ID:ViniciusConsultor,项目名称:petsys,代码行数:19,代码来源:frmDetalhesLeituraDaRevista.aspx.cs

示例9: ddl_Roles_ItemsRequested

        protected void ddl_Roles_ItemsRequested(object sender, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
        {
            BallyliffinDataContext db = new BallyliffinDataContext();

            List<sp_MembersByRole_ShortViewResult> roles = db.sp_MembersByRole_ShortView().ToList();

            foreach (sp_MembersByRole_ShortViewResult role in roles)
            {
                RadComboBoxItem item = new RadComboBoxItem();

                item.Text = (string)role.RoleDesc;
                item.Value = role.RoleID.ToString();

                item.Attributes.Add("RoleDesc", role.RoleDesc);
                item.Attributes.Add("Total", role.Total.Value.ToString());

                ddl_Roles.Items.Add(item);

                item.DataBind();
            }
        }
开发者ID:joanneog,项目名称:BallyliffinGAA,代码行数:21,代码来源:Default.aspx.cs

示例10: cboProcedimentosInternos_ItemsRequested

        protected void cboProcedimentosInternos_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
        {
            IList<ITipoDeProcedimentoInterno> listaProcedimentosInternos = new List<ITipoDeProcedimentoInterno>();

            using (var servico = FabricaGenerica.GetInstancia().CrieObjeto<IServicoDeTipoDeProcedimentoInterno>())
            {
                listaProcedimentosInternos = servico.obtenhaTipoProcedimentoInternoPelaDescricao(e.Text);
            }

            if (listaProcedimentosInternos.Count > 0)
            {
                foreach (var procedimentoInterno in listaProcedimentosInternos)
                {
                    var item = new RadComboBoxItem(procedimentoInterno.Descricao, procedimentoInterno.Id.Value.ToString());

                    item.Attributes.Add("ID", procedimentoInterno.Id.ToString());

                    cboTipoDeProcedimentosInternos.Items.Add(item);
                    item.DataBind();
                }
            }
        }
开发者ID:ViniciusConsultor,项目名称:petsys,代码行数:22,代码来源:cdTipoDeProcedimentoInterno.aspx.cs

示例11: CarregueCombo

        private void CarregueCombo(IList<Situacao> situacoesADesconsiderar)
        {
            if (situacoesADesconsiderar == null) situacoesADesconsiderar = new List<Situacao>();

            foreach (var situacao in Situacao.ObtenhaTodos())
            {
                if (!situacoesADesconsiderar.Contains(situacao))
                {
                    var item = new RadComboBoxItem(situacao.Descricao, situacao.ID.ToString());

                    cboSituacao.Items.Add(item);
                    item.DataBind();
                }
            }
        }
开发者ID:ViniciusConsultor,项目名称:petsys,代码行数:15,代码来源:ctrlSituacao.ascx.cs

示例12: RadComboBoxFirma_ItemsRequested

    protected void RadComboBoxFirma_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
    {
        //string BolgeKodu = Session["BolgeKodu"].ToString();
        //string bak = e.Text;
        if (e.Text.Length > 2)
        {
            string BolgeKodu = intBolgeKodu.ToString();
            string sqlSelectCommand = "";
            /*
            if (rdbtnlstAramaTipi.SelectedIndex == 0)//isnodan arama
                sqlSelectCommand = "SELECT [ObjectID], [isno], [adi], [birim] from [tblIsEmri] WHERE [isno] LIKE '%'+ @text + '%' ORDER BY [isno]";
            if (rdbtnlstAramaTipi.SelectedIndex == 1)//is adından arama
                sqlSelectCommand = "SELECT [ObjectID], [isno], [adi], [birim] from [tblIsEmri] WHERE [adi] LIKE '%'+ @text + '%' ORDER BY [adi]";
            if (rdbtnlstAramaTipi.SelectedIndex == 2)//Birimden arama
                sqlSelectCommand = "SELECT [ObjectID], [isno], [adi], [birim] from [tblIsEmri] WHERE [birim] LIKE '%'+ @text + '%' ORDER BY [birim]";
            */
            sqlSelectCommand = "SELECT [FIRMAID],[MUSTNO], [FIRMAADI], [IL_ILCE] from [firma] WHERE [FIRMAADI] LIKE '%'+ @text + '%' and SILINDI=0 and BOLGEKODU=" + BolgeKodu + " ORDER BY [FIRMAADI]";
            SqlDataAdapter adapter = new SqlDataAdapter(sqlSelectCommand, ConfigurationManager.ConnectionStrings["KalData"].ConnectionString);
            adapter.SelectCommand.Parameters.AddWithValue("@text", e.Text);
            DataTable dataTable = new DataTable();
            adapter.Fill(dataTable);
            //lblBulunanIsSayisi.Text = dataTable.Rows.Count.ToString();

            RadComboBoxFirma.Items.Clear();
            foreach (DataRow dataRow in dataTable.Rows)
            {
                string IlIlce = "";
                RadComboBoxItem item = new RadComboBoxItem();
                item.Text = (string)dataRow["MUSTNO"].ToString();
                item.Value = dataRow["FIRMAID"].ToString();
                string FirmaAdi = (string)dataRow["FIRMAADI"];
                if (dataRow["IL_ILCE"] != System.DBNull.Value)
                {
                    IlIlce = (string)dataRow["IL_ILCE"];
                }
                item.Attributes.Add("FIRMAADI", FirmaAdi);
                item.Attributes.Add("IL_ILCE", IlIlce);
                RadComboBoxFirma.Items.Add(item);
                item.DataBind();
            }
            Label lbl = (Label)RadComboBoxFirma.Footer.FindControl("lblBulunanKayitSayisi");
            lbl.Text = "Bulunan kayıt sayısı:" + "  " + dataTable.Rows.Count.ToString();
        }
    }
开发者ID:inancakcan,项目名称:kalibrasyon,代码行数:44,代码来源:GorevFirma.ascx.cs

示例13: CarregueCombo

        private void CarregueCombo()
        {
            foreach (var forma in FormaDeRecebimento.ObtenhaTodos())
            {
                var item = new RadComboBoxItem(forma.Descricao, forma.ID.ToString());

                cboFormaDeRecebimento.Items.Add(item);
                item.DataBind();
            }
        }
开发者ID:ViniciusConsultor,项目名称:petsys,代码行数:10,代码来源:ctrlFormaRecebimento.ascx.cs

示例14: RadComboBoxFirma_ItemsRequested

 protected void RadComboBoxFirma_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
 {
     EFDal ed = new EFDal();
     if (e.Text.Length > 2)
     {
         string BolgeKodu = ed.kal_BolgeKoduDon(Context.User.Identity.Name).ToString();
         string sqlSelectCommand = "";
         sqlSelectCommand = "SELECT [FIRMAID],[MUSTNO], [FIRMAADI], [IL_ILCE] from [firma] WHERE [FIRMAADI] LIKE '%'+ @text + '%' and SILINDI=0 and BOLGEKODU=" + BolgeKodu + " ORDER BY [FIRMAADI]";
         SqlDataAdapter adapter = new SqlDataAdapter(sqlSelectCommand, ConfigurationManager.ConnectionStrings["KalData"].ConnectionString);
         adapter.SelectCommand.Parameters.AddWithValue("@text", e.Text);
         DataTable dataTable = new DataTable();
         adapter.Fill(dataTable);
         RadComboBoxFirma.Items.Clear();
         foreach (DataRow dataRow in dataTable.Rows)
         {
             string IlIlce = "";
             RadComboBoxItem item = new RadComboBoxItem();
             item.Text = (string)dataRow["MUSTNO"].ToString();
             item.Value = dataRow["FIRMAID"].ToString();
             string FirmaAdi = (string)dataRow["FIRMAADI"];
             if (dataRow["IL_ILCE"] != System.DBNull.Value)
             {
                 IlIlce = (string)dataRow["IL_ILCE"];
             }
             item.Attributes.Add("FIRMAADI", FirmaAdi);
             item.Attributes.Add("IL_ILCE", IlIlce);
             RadComboBoxFirma.Items.Add(item);
             item.DataBind();
         }
         Label lbl = (Label)RadComboBoxFirma.Footer.FindControl("lblBulunanKayitSayisi");
         lbl.Text = "Bulunan kayıt sayısı:" + "  " + dataTable.Rows.Count.ToString();
     }
 }
开发者ID:inancakcan,项目名称:kalibrasyon,代码行数:33,代码来源:EditTeklif.aspx.cs

示例15: cboNaturezaPatente_ItemsRequested

        protected void cboNaturezaPatente_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
        {
            IList<INaturezaPatente> listaNaturezaPatente = new List<INaturezaPatente>();

            using (var servico = FabricaGenerica.GetInstancia().CrieObjeto<IServicoDeNaturezaPatente>())
                listaNaturezaPatente = servico.obtenhaNaturezaPatentePelaSiglaComoFiltro(e.Text, 50);

            if (listaNaturezaPatente.Count > 0)
            {
                foreach (var naturezaPatente in listaNaturezaPatente)
                {
                    var item = new RadComboBoxItem(naturezaPatente.SiglaNatureza, naturezaPatente.IdNaturezaPatente.Value.ToString());

                    item.Attributes.Add("Descricao", naturezaPatente.DescricaoNaturezaPatente ?? "Não informada");

                    cboNaturezaPatente.Items.Add(item);
                    item.DataBind();
                }
            }
        }
开发者ID:ViniciusConsultor,项目名称:petsys,代码行数:20,代码来源:ctrlNaturezaPatente.ascx.cs


注:本文中的RadComboBoxItem.DataBind方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。