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


C# RadComboBox类代码示例

本文整理汇总了C#中RadComboBox的典型用法代码示例。如果您正苦于以下问题:C# RadComboBox类的具体用法?C# RadComboBox怎么用?C# RadComboBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: ClearComboData

 public void ClearComboData(RadComboBox combo)
 {
     if(combo != null && combo.Items != null)
     {
         combo.Items.Clear();
     }
 }
开发者ID:groshugo,项目名称:unitedpharma,代码行数:7,代码来源:UtilitiesHelpers.cs

示例2: GetSpreadsheets

    public string GetSpreadsheets(Hashtable State, RadComboBox Spreadsheets)
    {
        try
        {
            SpreadsheetsService service = new SpreadsheetsService(State["SelectedApp"].ToString());

            GOAuthRequestFactory requestFactory = new GOAuthRequestFactory("wise", "MobiFlex");
            requestFactory.ConsumerKey = ConfigurationManager.AppSettings["GoogleAppsKey"];
            requestFactory.ConsumerSecret = ConfigurationManager.AppSettings["GoogleAppsSecret"];
            service.RequestFactory = requestFactory;
            //get all spreadsheets
            Google.GData.Spreadsheets.SpreadsheetQuery query = new Google.GData.Spreadsheets.SpreadsheetQuery();
            query.OAuthRequestorId = State["CustomerEmail"].ToString();
            query.Uri = new Uri("https://spreadsheets.google.com/feeds/spreadsheets/private/full?xoauth_requestor_id=" + State["CustomerEmail"].ToString());

            SpreadsheetFeed feed = service.Query(query);

            Spreadsheets.Items.Clear();
            Spreadsheets.Items.Add(new RadComboBoxItem("Select Spreadsheet ->", "->"));
            foreach (SpreadsheetEntry entry in feed.Entries)
            {
                string spreadsheet_name = entry.Title.Text;
                Spreadsheets.Items.Add(new RadComboBoxItem(spreadsheet_name, spreadsheet_name));
            }
            return "OK";
        }
        catch (Exception ex)
        {
            Util util = new Util();
            util.LogError(State, ex);
            return ex.Message;
        }
    }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:33,代码来源:GDocs.cs

示例3: cmbCustomerProducts_OnLoad

        // public void cmbCustomerProducts_OnLoad(object sender, EventArgs e)
        public void cmbCustomerProducts_OnLoad(RadComboBox Box)
        {
            using (DataClasses1DataContext dbContext = new DataClasses1DataContext())
            {
                try
                {
                    if (Session["editableProductId"] != null && !String.IsNullOrEmpty(Session["editableProductId"].ToString()))
                    {
                        string myProductId = Session["editableProductId"].ToString();
                        Box.Visible = true;

                        var myCustomers = from cust in dbContext.Customer
                                          join lCust in dbContext.LargeCustomer on cust.Id equals lCust.CustomerId
                                          orderby cust.Name ascending
                                          select new
                                          {
                                              CustomerId = cust.Id,
                                              CustomerName = String.IsNullOrEmpty(cust.MatchCode) ? cust.Name : cust.Name + "(" + cust.MatchCode + ")",
                                              IsChecked = dbContext.CustomerProduct.SingleOrDefault(q => q.ProductId == Int32.Parse(myProductId) && q.CustomerId == cust.Id) != null ? true : false
                                          };

                        Box.DataSource = myCustomers;
                        Box.DataBind();
                    }
                }
                catch (Exception ex)
                {
                    dbContext.WriteLogItem("Product Error " + ex.Message, LogTypes.ERROR, "Product");
                    throw new Exception(ex.Message);
                }
            }
        }
开发者ID:HedinRakot,项目名称:KVS,代码行数:33,代码来源:AllProducts.ascx.cs

示例4: FillApstDDL

 public static void FillApstDDL(RadComboBox ddlApst, List<TouristApstInfo> lstTouristApst, int intSelected, int intTerritoryID)
 {
     ddlApst.DataSource = lstTouristApst;
     ddlApst.DataTextField = "TuristApstakli";
     ddlApst.DataValueField = "TuristApstakli_ID";
     ddlApst.DataBind();
     ddlApst.SelectedValue = intSelected.ToString();
 }
开发者ID:geolabgit,项目名称:lgprep,代码行数:8,代码来源:MethodTour.cs

示例5: bindComboBox

 protected void bindComboBox(RadComboBox r, DataSet d)
 {
     r.Items.Clear();
     r.DataTextField = "AutoSearchResult";
     r.DataSource = d;
     r.DataBind();
     r.Items.Insert(0, new RadComboBoxItem("", "0"));
     r.SelectedValue = "0";
 }
开发者ID:pareshf,项目名称:testthailand,代码行数:9,代码来源:LedgerReports.aspx.cs

示例6: GetSelectedValueOfCombo

    public int GetSelectedValueOfCombo(RadComboBox combo)
    {
        if (combo.Items.Count > 0 && combo.SelectedIndex > 0)
        {
            return int.Parse(combo.SelectedValue);

        }
        return 0;
    }
开发者ID:groshugo,项目名称:unitedpharma,代码行数:9,代码来源:UtilitiesHelpers.cs

示例7: GetBrushFromCombo

		private SolidColorBrush GetBrushFromCombo(RadComboBox comboBox)
		{
			ColorStringConverter converter = new ColorStringConverter();
			SolidColorBrush brush = converter.Convert(comboBox.SelectedItem,
				typeof(SolidColorBrush),
				null,
				System.Globalization.CultureInfo.CurrentUICulture) as SolidColorBrush;

			return brush;
		}
开发者ID:netintellect,项目名称:PluralsightSpaJumpStartFinal,代码行数:10,代码来源:Example.xaml.cs

示例8: SetupFilterControls

        //public override string EvaluateFilterExpression(GridFilteringItem filteringItem)
        //{
        //    return base.DataField + "=";
        //}

        protected override void SetupFilterControls(TableCell cell)
        {
            RadComboBox rcBox = new RadComboBox();
            rcBox.ID = "cbxFilter" + base.UniqueName;
            rcBox.Width = this.ControlWidth;
            rcBox.AutoPostBack = true;
            rcBox.SelectedIndexChanged += rcBox_SelectedIndexChanged;
            rcBox.Items.Add(XCombo.CreateEmptyItem());
            rcBox.Items.AddRange(this.ItemSource.ToRadComboBoxList());

            cell.Controls.Add(rcBox);
        }
开发者ID:ionixNet,项目名称:ionix.UI,代码行数:17,代码来源:GridComboBoxColumn.Filter.cs

示例9: onitemrequest

        protected void onitemrequest(RadComboBox r, DataTable dt, int noofitems)
        {

            ipr = dt.Rows.Count;
            int io = noofitems;
            int eo = Math.Min(io + ipr, dt.Rows.Count);
            r.Items.Clear();
            for (int i = io; i < eo; i++)
            {
                r.Items.Add(new RadComboBoxItem(dt.Rows[i]["AutoSearchResult"].ToString(), dt.Rows[i]["AutoSearchResult"].ToString()));
            }
        }
开发者ID:pareshf,项目名称:testthailand,代码行数:12,代码来源:LedgerReports.aspx.cs

示例10: PopulateMasterSpeciality

    public void PopulateMasterSpeciality(RadComboBox rcbSpeciality)
    {
        DataSet dsSpeciality = objSpecialityBAL.SelectMasterSpeciality();

        if (dsSpeciality.Tables.Count > 0 && dsSpeciality.Tables[0].Rows.Count > 0)
        {
            rcbSpeciality.DataSource = dsSpeciality;
            rcbSpeciality.DataTextField = "DepartmentName";
            rcbSpeciality.DataValueField = "DepartmentId";
            rcbSpeciality.DataBind();
        }
        RadComboBoxItem CountryListItem = new RadComboBoxItem("--Select--", "--Select--");
        rcbSpeciality.Items.Insert(0, CountryListItem);
    }
开发者ID:hurricanechaser,项目名称:CareerJobs,代码行数:14,代码来源:Job_AdminSpeciality.aspx.cs

示例11: cmbCustomerProducts_OnLoad

        // public void cmbCustomerProducts_OnLoad(object sender, EventArgs e)
        public void cmbCustomerProducts_OnLoad(RadComboBox Box)
        {
            using (DataClasses1DataContext dbContext = new DataClasses1DataContext())
            {
                try
                {
                    //RadComboBox cmbCustomerProducts = ((RadComboBox)sender);

                    //cmbCustomerProducts.Items.Clear();
                    //cmbCustomerProducts.Text = string.Empty;

                    if (Session["editableProductId"] != null && Session["editableProductId"].ToString() != string.Empty)
                    {
                        string myProductId = Session["editableProductId"].ToString();
                        Box.Visible = true;
                        //var myCustomers = from cust in dbContext.Customer
                        //                  join custProd in dbContext.CustomerProduct on cust.Id equals custProd.CustomerId into JoinedCustProd
                        //                  from custProd in JoinedCustProd.DefaultIfEmpty()
                        //                  orderby cust.Name ascending
                        //                  select new
                        //                  {
                        //                      CustomerId = cust.Id,
                        //                      CustomerName = cust.Name,
                        //                      IsChecked = custProd.ProductId == new Guid(Session["selectedProductId"].ToString()) ? true : false
                        //                  };

                        var myCustomers = from cust in dbContext.Customer
                                          join lCust in dbContext.LargeCustomer on cust.Id equals lCust.CustomerId
                                          orderby cust.Name ascending
                                          select new
                                          {
                                              CustomerId = cust.Id,
                                              CustomerName = String.IsNullOrEmpty(cust.MatchCode) ? cust.Name : cust.Name + "(" + cust.MatchCode + ")",
                                              IsChecked = dbContext.CustomerProduct.SingleOrDefault(q => q.ProductId == new Guid(myProductId) && q.CustomerId == cust.Id) != null ? true : false
                                          };

                        Box.DataSource = myCustomers;
                        Box.DataBind();
                        //cmbCustomerProducts.DataSource = myCustomers;
                        //cmbCustomerProducts.DataBind();
                    }
                }
                catch (Exception ex)
                {
                    dbContext.WriteLogItem("Product Error " + ex.Message, LogTypes.ERROR, "Product");
                    throw new Exception(ex.Message);
                }
            }
        }
开发者ID:HedinRakot,项目名称:KVS,代码行数:50,代码来源:AllProducts.ascx.cs

示例12: SetupFilterControls

 //RadGrid will call this method when it initializes the controls inside the filtering item cells
 protected override void SetupFilterControls(TableCell cell)
 {
     base.SetupFilterControls(cell);
     cell.Controls.RemoveAt(0);
     RadComboBox combo = new RadComboBox();
     combo.ID = ("RadComboBox1" + this.UniqueName);
     combo.ShowToggleImage = false;
     combo.EnableLoadOnDemand = true;
     combo.AutoPostBack = true;
     combo.MarkFirstMatch = true;
     combo.Height = Unit.Pixel(100);
     combo.ItemsRequested += this.list_ItemsRequested;
     combo.SelectedIndexChanged += this.list_SelectedIndexChanged;
     cell.Controls.AddAt(0, combo);
     cell.Controls.RemoveAt(1);
 }
开发者ID:zgying,项目名称:CRMWeiXin,代码行数:17,代码来源:CustomFilteringColumn.cs

示例13: getPaymentCurrency

        public void getPaymentCurrency(RadComboBox cbx)
        {
            sqlStr = "SELECT * FROM Currency WHERE Active=1 ORDER BY CurrencyID ASC";
            sqlCon = new SqlConnection(cnStr);
            sqlCon.Open();

            sqlDA = new SqlDataAdapter(sqlStr, sqlCon);
            dTable = new DataTable();
            sqlDA.Fill(dTable);

            cbx.DataSource = dTable;
            cbx.DataTextField = "CurrencyName";
            cbx.DataValueField = "CurrencyID";
            cbx.DataBind();

            sqlCon.Close();
            sqlCon.Dispose();
        }
开发者ID:Mithunchowdhury,项目名称:Save-the-children-,代码行数:18,代码来源:PaymentGateway.cs

示例14: getComboList_ID_Name

        public void getComboList_ID_Name(empStatus eStatus, RadComboBox cbx)
        {
            sqlStr = "EXEC proc_Get_EmpInfoIdName '" + (int)eStatus + "'";
            sqlCon = new SqlConnection(cnStr);
            sqlCon.Open();

            sqlDA = new SqlDataAdapter(sqlStr, sqlCon);
            dTable = new DataTable();
            sqlDA.Fill(dTable);

            cbx.DataSource = dTable;
            cbx.DataTextField = "FullName";
            cbx.DataValueField = "EmpId";
            cbx.DataBind();

            sqlCon.Close();
            sqlCon.Dispose();
        }
开发者ID:Mithunchowdhury,项目名称:Save-the-children-,代码行数:18,代码来源:HRISGateway.cs

示例15: InitAppPages

    public void InitAppPages(Hashtable State, RadComboBox AppPages, bool includeCurrentPage)
    {
        AppPages.Items.Clear();

        if(State["SelectedApp"] == null || State["SelectedApp"].ToString().Contains("->"))
            return;

        XmlUtil x_util = new XmlUtil();
        string[] pages = x_util.GetAppPageNames(State, State["SelectedApp"].ToString());

        foreach (string page in pages)
        {
            if (!includeCurrentPage && State["SelectedAppPage"] != null && State["SelectedAppPage"].ToString() == page)
                continue;

            AppPages.Items.Add(new RadComboBoxItem(page, page));
        }
        AppPages.SelectedIndex = 0;
    }
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:19,代码来源:Init.cs


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