本文整理汇总了C#中RadComboBox类的典型用法代码示例。如果您正苦于以下问题:C# RadComboBox类的具体用法?C# RadComboBox怎么用?C# RadComboBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RadComboBox类属于命名空间,在下文中一共展示了RadComboBox类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: InitAccountList
public void InitAccountList(Hashtable State, RadComboBox Accounts, bool Initialize)
{
string sql = "SELECT username FROM customers ORDER BY username";
DB db = new DB();
DataRow[] rows = db.ViziAppsExecuteSql(State, sql);
Accounts.Items.Clear();
int index = 0;
foreach (DataRow row in rows)
{
string username = row["username"].ToString();
Accounts.Items.Add(new RadComboBoxItem(username,username));
if (Initialize)
{
if (username == State["Username"].ToString())
Accounts.SelectedIndex = index;
index++;
}
}
if (!Initialize)
Accounts.Items.Insert(0, new RadComboBoxItem("Select Account ->","Select Account ->"));
db.CloseViziAppsDatabase(State);
}
开发者ID:dcolonvizi,项目名称:ViziAppsPortal,代码行数:23,代码来源:Init.cs
示例17: GetTouristList
public static List<TouristInfo> GetTouristList(int intPolNumber, int intTerritoryID)
{
var lstTourists = (from oneRow in linqContext.pusT_PolTuristiSaraksts
where oneRow.Polises_ID == intPolNumber
orderby oneRow.PolTuristiSaraksts
select new TouristInfo()
{
PolTuristiSaraksts = 0,
Vards = oneRow.Vards,
Uzvards = oneRow.Uzvards,
PersKods = oneRow.PersKods,
ApdrNemajs = oneRow.ApdrNemajs.Value,
Apstaklis_ID = oneRow.Apstaklis_ID.Value,
SpecDatumsNo = oneRow.SpecDatumsNo,
SpecDatumsLi = oneRow.SpecDatumsLi,
Fransize = oneRow.Fransize.Value,
PolDarbDienas = oneRow.PolDarbDienas.Value,
DzDatums = oneRow.DzDatums,
IsResident = oneRow.IsResident,
HomeAddress = oneRow.HomeAddress,
GuestAddress = oneRow.GuestAddress,
IsLegal = oneRow.IsLegal.Value,
PassID = oneRow.PassID
}).ToList();
int intCount = 0;
var ddlAp = new RadComboBox();
foreach (TouristInfo n in lstTourists)
{
if (!n.Apstaklis_ID.HasValue)
n.Apstaklis_ID = 0;
var lstTouristApst = GetTouristApstList(intTerritoryID);
n.Apstaklis = lstTouristApst.Find(g => g.TuristApstakli_ID == n.Apstaklis_ID).TuristApstakli;
n.PolTuristiSaraksts = intCount++;
}
return lstTourists;
}
开发者ID:geolabgit,项目名称:lgprep,代码行数:36,代码来源:MethodTour.cs
示例18: saveCharge
private void saveCharge(RadTextBox txtChargeCode, RadComboBox cbChargeCcy, RadComboBox cbChargeAcc, RadNumericTextBox txtChargeAmt, RadComboBox cbChargeParty, RadComboBox cbChargeAmort,
RadComboBox cbChargeStatus, Label lblTaxCode, Label lblTaxAmt, ref BEXPORT_LC_DOCS_SETTLEMENT_CHARGES ExLCCharge)
{
ExLCCharge.PaymentCode = tbLCCode.Text;
ExLCCharge.ChargeCode = txtChargeCode.Text;
ExLCCharge.ChargeCcy = cbChargeCcy.SelectedValue;
ExLCCharge.ChargeAcc = cbChargeAcc.SelectedValue;
ExLCCharge.ChargeAmt = txtChargeAmt.Value;
ExLCCharge.PartyCharged = cbChargeParty.SelectedValue;
ExLCCharge.AmortCharge = cbChargeAmort.SelectedValue;
ExLCCharge.ChargeStatus = cbChargeStatus.SelectedValue;
ExLCCharge.TaxCode = lblTaxCode.Text;
if (!string.IsNullOrEmpty(lblTaxAmt.Text))
ExLCCharge.TaxAmt = Convert.ToDouble(lblTaxAmt.Text);
}
开发者ID:nguyenppt,项目名称:tfinance0115,代码行数:15,代码来源:Settlement.ascx.cs
示例19: loadCharge
private void loadCharge(BEXPORT_LC_DOCS_PROCESSING_CHARGES ExLCCharge, ref RadTextBox txtChargeCode, ref RadComboBox cbChargeCcy, ref RadComboBox cbChargeAcc, ref RadNumericTextBox txtChargeAmt,
ref RadComboBox cbChargeParty, ref RadComboBox cbChargeAmort, ref RadComboBox cbChargeStatus, ref Label lblTaxCode, ref Label lblTaxAmt)
{
txtChargeCode.Text = ExLCCharge.ChargeCode;
cbChargeCcy.SelectedValue = ExLCCharge.ChargeCcy;
cbChargeAcc.SelectedValue = ExLCCharge.ChargeAcc;
txtChargeAmt.Value = ExLCCharge.ChargeAmt;
cbChargeParty.SelectedValue = ExLCCharge.PartyCharged;
cbChargeAmort.SelectedValue = ExLCCharge.AmortCharge;
cbChargeStatus.SelectedValue = ExLCCharge.ChargeStatus;
lblTaxCode.Text = ExLCCharge.TaxCode;
if (ExLCCharge.TaxAmt.HasValue)
lblTaxAmt.Text = ExLCCharge.TaxAmt.ToString();
}
开发者ID:nguyenppt,项目名称:tfinance0115,代码行数:14,代码来源:Settlement.ascx.cs
示例20: CreateGrid
private Grid CreateGrid(string aParameterName, Property aProperty)
{
try
{
Grid _result = new Grid();
_result.Width = double.NaN;
ColumnDefinition _cd1 = new ColumnDefinition();
//cd1.Width = new GridLength(1,GridUnitType.Auto);
_result.ColumnDefinitions.Add(_cd1);
ColumnDefinition _cd2 = new ColumnDefinition();
//cd2.Width = new GridLength(1, GridUnitType.Auto);
_result.ColumnDefinitions.Add(_cd2);
TextBlock _tblk = new TextBlock();
_tblk.FontFamily = new FontFamily("Segoe UI");
_tblk.FontWeight = FontWeights.Bold;
//tblk.FontSize = 14;
_tblk.Text = aParameterName;
_tblk.Margin = new Thickness(5, 10, 2, 0);
Grid.SetColumn(_tblk, 0);
_result.Children.Add(_tblk);
InControl _InControl = new InControl();
if (!aProperty.IsMultipleSelection)
{
TextBox _tbx = new TextBox();
_tbx.Tag = aProperty;
_tbx.HorizontalAlignment = HorizontalAlignment.Right;
_tbx.Width = 50;
_tbx.Text = "1";
_tbx.Margin = new Thickness(0, 10, 10, 0);
Grid.SetColumn(_tbx, 1);
_InControl.TextBox = _tbx;
_InControl.ControlType = ControlType.TextBox;
_result.Children.Add(_tbx);
}
else
{
RadComboBox _combbx = new RadComboBox();
_combbx.ItemsSource = aProperty.Value_Converters;
_combbx.DisplayMemberPath = "Value";
_combbx.SelectedIndex = 0;
_combbx.Tag = aProperty;
_combbx.Margin = new Thickness(0, 10, 10, 0);
_combbx.HorizontalAlignment = HorizontalAlignment.Right;
Grid.SetColumn(_combbx, 1);
_InControl.ComboBox = _combbx;
_InControl.ControlType = ControlType.ComboBox;
_result.Children.Add(_combbx);
}
if (InTextBoxs != null)
InTextBoxs.Add(_InControl);
return _result;
}
catch (Exception _ex)
{
GeneralTools.Tools.WriteToLog(_ex);
return null;
}
}
开发者ID:svegapons,项目名称:clustering_ensemble_suite,代码行数:70,代码来源:AllParametersMeasuresVisualizer.xaml.cs
注:本文中的RadComboBox类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论