本文整理汇总了C#中RadComboBoxItem类的典型用法代码示例。如果您正苦于以下问题:C# RadComboBoxItem类的具体用法?C# RadComboBoxItem怎么用?C# RadComboBoxItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RadComboBoxItem类属于命名空间,在下文中一共展示了RadComboBoxItem类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: OnPreRender
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
Entities.Users.UserInfo userInfo = Entities.Users.UserController.GetCurrentUserInfo();
if (! Page.IsPostBack && userInfo != null && userInfo.UserID != Null.NullInteger)
{
//check view permissions - Yes?
var portalSettings = PortalController.GetCurrentPortalSettings();
var pageCulture = Thread.CurrentThread.CurrentCulture.Name;
if (string.IsNullOrEmpty(pageCulture))
{
pageCulture = PortalController.GetActivePortalLanguage(portalSettings.PortalId);
}
List<TabInfo> tabs = TabController.GetTabsBySortOrder(portalSettings.PortalId, pageCulture, true);
var sortedTabList = TabController.GetPortalTabs(tabs, Null.NullInteger, false, Null.NullString, true, false, true, true, true);
Items.Clear();
foreach (var _tab in sortedTabList)
{
RadComboBoxItem tabItem = new RadComboBoxItem(_tab.IndentedTabName, _tab.FullUrl);
tabItem.Enabled = ! _tab.DisableLink;
Items.Add(tabItem);
}
Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("", ""));
}
Width = Unit.Pixel(245);
}
开发者ID:biganth,项目名称:Curt,代码行数:33,代码来源:PageDropDownList.cs
示例2: Create
public void Create(string objname, string id,string name, string templatename)
{
_objname = objname;
_id = id;
_name = name;
DataReturn dr = AxiomIRISRibbon.Utility.HandleData(_d.GetTemplates(true));
if (!dr.success) return;
DataTable dt = dr.dt;
cbTemplates.Items.Clear();
RadComboBoxItem i;
RadComboBoxItem selected = null;
foreach (DataRow r in dt.Rows)
{
i = new RadComboBoxItem();
i.Tag = r["Id"].ToString() + "|" + r["PlaybookLink__c"].ToString();
i.Content = r["Name"].ToString();
this.cbTemplates.Items.Add(i);
if (r["Name"].ToString().ToLower() == templatename.Trim().ToLower()) selected = i;
}
// if we have a match then select it
if (selected != null)
{
this.cbTemplates.SelectedItem = selected;
}
}
开发者ID:santoshsaha,项目名称:AxiomCS-Ribbon01,代码行数:32,代码来源:NewFromTemplate.xaml.cs
示例3: LoadItemsInternal
protected virtual void LoadItemsInternal()
{
base.Items.Clear();
if (this.FirstItemEmpty)
base.Items.Add(XCombo.CreateEmptyItem());
using (IDataReader dr = this.CreateDataReader())
{
StringBuilder sb = new StringBuilder();
while (dr.Read())
{
int j = 1;
for (; j < dr.FieldCount - 1; ++j)
{
object value = dr[j];
if (value != DBNull.Value)
{
sb.Append(value);
sb.Append(" - ");
}
}
sb.Append(dr[j]);
RadComboBoxItem item = new RadComboBoxItem(sb.ToString(), dr[0].ToString());
base.Items.Add(item);
sb.Length = 0;
}
}
}
开发者ID:ionixNet,项目名称:ionix.UI,代码行数:31,代码来源:ComboBox.cs
示例4: LoadGradeButtonFilter
protected void LoadGradeButtonFilter()
{
var gradesByCurriculumCourses = _curriculumCourseList.GetGradeList();
gradeDropdown.Items.Clear();
gradeDropdown.Attributes["teacherID"] = _teacherID.ToString();
foreach (var g in gradesByCurriculumCourses)
{
RadComboBoxItem item = new RadComboBoxItem();
item.Text = g.DisplayText;
item.Value = g.DisplayText;
item.Attributes["gradeOrdinal"] = g.GetFriendlyName();
if (g.DisplayText == grade)
{
item.Selected = true;
}
gradeDropdown.Items.Add(item);
}
initGrade.Value = gradeDropdown.SelectedIndex.ToString();
if (gradeDropdown.SelectedValue.Length == 0 && gradeDropdown.Items.Count == 1)
{
gradeDropdown.Items[0].Selected = true;
}
}
开发者ID:ezimaxtechnologies,项目名称:ASP.Net,代码行数:30,代码来源:StarReport.aspx.cs
示例5: 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
示例6: LoadSchoolDropdown
private void LoadSchoolDropdown()
{
schoolDropdown.Items.Clear();
//Build school ListBox
foreach (var school in _schools)
{
var schoolListItem = new RadComboBoxItem
{
Text = school.Name,
Value = school.ID.ToString(CultureInfo.InvariantCulture)
};
schoolDropdown.Items.Add(schoolListItem);
var itemLabel = (Label)schoolListItem.FindControl("schoolLabel");
if (itemLabel != null)
{
itemLabel.Text = school.Name;
}
}
var findButton = new RadComboBoxItem();
schoolDropdown.Items.Add(findButton);
var findButtonCheckbox = (CheckBox)findButton.FindControl("schoolCheckbox");
if (findButtonCheckbox != null)
{
findButtonCheckbox.InputAttributes["style"] = "display:none;";
}
}
开发者ID:ezimaxtechnologies,项目名称:ASP.Net,代码行数:32,代码来源:AddStaff.aspx.cs
示例7: Page_Init
protected void Page_Init(object sender, EventArgs e)
{
string uname = Request.QueryString["uname"].ToString();
string getuid = "select [ID] from [User] where [uname] = '"+uname+"'";
DataSet ds = new DataSet();
ds = fbc.ReturnDS(getuid);
string uidd = ds.Tables[0].Rows[0]["ID"].ToString();
Session["VID"] = uidd;
string getalbums = "SELECT * FROM Albums WHERE UID = " +uidd;
DataTable dt = new DataTable();
dt = fbc.ReturnDT(getalbums);
albums.DataSource = dt;
albums.DataBind();
RadComboBoxItem item = new RadComboBoxItem();
item.Value = "propic";
item.Text = "Profile Photos";
albums.Items.Add(item);
RadComboBoxItem item2 = new RadComboBoxItem();
item2.Value = "select";
item2.Text = "Select Album";
albums.Items.Add(item2);
int d = albums.Items.Count;
albums.Items[d-1].Selected = true;
}
开发者ID:vaibhavgeek,项目名称:friendyoke,代码行数:31,代码来源:albums.ascx.cs
示例8: RadScheduler1_DataBound
protected void RadScheduler1_DataBound(object sender, EventArgs e)
{
RadScheduler1.ResourceTypes.FindByName("User").AllowMultipleValues = true;
IList<Resource> pagedResources = new List<Resource>(RadScheduler1.Resources.GetResourcesByType("User"));
IList<Resource> remainingResources = new List<Resource>();
IList<RadComboBoxItem> comboItems = new List<RadComboBoxItem>();
RadCombobox1.Items.Clear();
//int resourceIndex = 0;
string selectedLetter = Hiddenfield1.Value;
char[] sep = { ',' };
string[] newResources = selectedLetter.Split(sep, StringSplitOptions.RemoveEmptyEntries);
foreach (Resource resource in pagedResources)
{
bool isSelected = false;
for (int i = 0; i < newResources.Length; i++)
{
if (resource.Text != newResources[i])
{
isSelected = true;
}
else
{
isSelected = false;
break;
}
}
if (isSelected)
{
RadScheduler1.Resources.Remove(resource);
remainingResources.Add(resource);
RadCombobox1.Items.Add(new RadComboBoxItem(resource.Text));
}
else
{
RadComboBoxItem newItem = new RadComboBoxItem(resource.Text);
newItem.Checked = true;
RadCombobox1.Items.Add(newItem);
}
}
// Hiddenfield1.Value = "ready";
//}
//else
//{
// foreach (Resource resource in pagedResources)
// {
// RadCombobox1.Items.Add(new RadComboBoxItem(resource.Text));
// }
//}
Session["remainingResources"] = remainingResources;
}
开发者ID:angelpetrov90,项目名称:aspnet-sdk,代码行数:58,代码来源:Default.aspx.cs
示例9: FillDateFilterDDL
protected void FillDateFilterDDL()
{
DdlDate.Items.Add(new RadComboBoxItem("Today's data", "0"));
DdlDate.Items.Add(new RadComboBoxItem("Last seven days", "7"));
DdlDate.Items.Add(new RadComboBoxItem("Current month", "30"));
RadComboBoxItem rcbItem = new RadComboBoxItem("All", "-1");
rcbItem.Selected = true;
DdlDate.Items.Add(rcbItem);
DdlDate.Items.Add(new RadComboBoxItem("Custom date...", "-2"));
}
开发者ID:WFPVAM,项目名称:GRASPReporting,代码行数:10,代码来源:ReviewRestore.aspx.cs
示例10: 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
示例11: PromotionList
private void PromotionList()
{
ObjLogin cust = (ObjLogin)Session["objLogin"];
ddlPromotion.DataSource = ScheduleRepo.GetListPhonePromotion(cust.Phone,Constant.outbox);
ddlPromotion.DataTextField = "Title";
ddlPromotion.DataValueField = "Id";
ddlPromotion.DataBind();
RadComboBoxItem item = new RadComboBoxItem("Select all", "0");
ddlPromotion.Items.Insert(0, item);
}
开发者ID:groshugo,项目名称:unitedpharma,代码行数:10,代码来源:SMSOutbox.aspx.cs
示例12: ListRegion
private void ListRegion()
{
var region = (int.Parse(ddlGroup.SelectedValue) > 0) ? regionRepo.GetRegionByGroupId(int.Parse(ddlGroup.SelectedValue)) : regionRepo.GetAll();
ddlRegion.DataSource = region;
ddlRegion.DataTextField = "RegionName";
ddlRegion.DataValueField = "Id";
ddlRegion.DataBind();
RadComboBoxItem item = new RadComboBoxItem("Select a region", "0");
ddlRegion.Items.Insert(0, item);
}
开发者ID:groshugo,项目名称:unitedpharma,代码行数:10,代码来源:SalesmenPage.aspx.cs
示例13: ListGroup
private void ListGroup()
{
var group = groupRepo.GetAll();
ddlGroup.DataSource = group;
ddlGroup.DataTextField = "GroupName";
ddlGroup.DataValueField = "Id";
ddlGroup.DataBind();
RadComboBoxItem item = new RadComboBoxItem("Select a group", "0");
ddlGroup.Items.Insert(0, item);
}
开发者ID:groshugo,项目名称:unitedpharma,代码行数:10,代码来源:SalesmenPage.aspx.cs
示例14: ListCustomerType
/// <summary>
/// Load data to comboboxes when page_load
/// </summary>
private void ListCustomerType()
{
var customertype = CTypeRepo.GetAll();
ddlCustomerType.DataSource = customertype;
ddlCustomerType.DataTextField = "TypeName";
ddlCustomerType.DataValueField = "Id";
ddlCustomerType.DataBind();
RadComboBoxItem item=new RadComboBoxItem("Select a type","0");
ddlCustomerType.Items.Insert(0, item);
}
开发者ID:groshugo,项目名称:unitedpharma,代码行数:13,代码来源:DialogPhoneNumber.aspx.cs
示例15: ListChannel
private void ListChannel()
{
var channelList = ChannelRepo.GetAll();
ddlChannel.DataSource = channelList;
ddlChannel.DataValueField = "Id";
ddlChannel.DataTextField = "ChannelName";
ddlChannel.DataBind();
RadComboBoxItem item = new RadComboBoxItem("Select a channel", "0");
ddlChannel.Items.Insert(0, item);
}
开发者ID:groshugo,项目名称:unitedpharma,代码行数:10,代码来源:DialogPhoneNumber.aspx.cs
示例16: PopulateOccupation
private void PopulateOccupation()
{
SqlConnection sqlConnectionX;
SqlCommand sqlCommandX;
SqlParameter sqlParam;
SqlDataReader sqlDR;
try
{
sqlConnectionX = new SqlConnection(ConfigurationManager.AppSettings["SQLConnection"]);
sqlConnectionX.Open();
sqlCommandX = new SqlCommand();
sqlCommandX.Connection = sqlConnectionX;
sqlCommandX.CommandType = CommandType.StoredProcedure;
sqlCommandX.CommandText = "spx_SELECT_Occupation";
sqlDR = sqlCommandX.ExecuteReader();
DataTable dtResult = new DataTable("Result");
dtResult.Load(sqlDR);
sqlDR.Close();
sqlCommandX.Cancel();
sqlCommandX.Dispose();
RadComboBoxOccupation.DataTextField = "Occupation";
RadComboBoxOccupation.DataValueField = "OccupationID";
RadComboBoxItem cbDefaultItem = new RadComboBoxItem();
cbDefaultItem.Value = "0";
cbDefaultItem.Text = "- Please select an occupation -";
RadComboBoxOccupation.Items.Add(cbDefaultItem);
foreach (DataRow dataRow in dtResult.Rows)
{
RadComboBoxItem cbItem = new RadComboBoxItem();
cbItem.Value = dataRow[0].ToString().Trim();
cbItem.Text = dataRow[1].ToString().Trim();
cbItem.Attributes.Add("Life", dataRow[2].ToString());
cbItem.Attributes.Add("ADW", dataRow[3].ToString());
cbItem.Attributes.Add("OCC", dataRow[4].ToString());
RadComboBoxOccupation.Items.Add(cbItem);
}
//RadComboBoxOccupation.DataSource = dtResult;
//RadComboBoxOccupation.DataBind();
}
catch (Exception ex)
{
lblInfo.Text = ex.Message;
lblInfo2.Text = ex.Message;
}
}
开发者ID:warrickg,项目名称:AllLifePricingWeb,代码行数:54,代码来源:Quote.aspx.cs
示例17: 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
示例18: 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
示例19: InitDDL
protected override void InitDDL()
{
SiteType st = new SiteType();
st.Query.AddOrderBy(SiteType.ColumnNames.Name, WhereParameter.Dir.ASC);
if (st.Query.Load())
{
do
{
RadComboBoxItem item = new RadComboBoxItem(st.s_Name, st.SiteTypeID.ToString());
this.ddlList.Items.Add(item);
} while (st.MoveNext());
}
}
开发者ID:ivladyka,项目名称:OurTravels,代码行数:13,代码来源:SiteTypeChoice.ascx.cs
示例20: AxSearchBox
public AxSearchBox(sfPartner.Field f)
{
InitializeComponent();
_f = f;
_d = Globals.ThisAddIn.getData();
// TODO for now assume that we are looking up by the Name field
// this isn't always true, e.g. Task is Subject *but* the only way to do it
// is to load the full definition of the object from Salesforce and step through all the
// fields and find the one with nameField set to true - I'm actually doing that for the
// object that we load but would need to look up the others when we get a reference
_namefield = "Name";
//If it can only be one object then hide the object picker
if (f.referenceTo.Length == 1)
{
o1.Visibility = System.Windows.Visibility.Collapsed;
coldefo1.Width = new GridLength(0);
}
//Otherwise populate
o1.Items.Clear();
foreach (string s in f.referenceTo)
{
RadComboBoxItem cbi = new RadComboBoxItem();
cbi.Tag = s;
cbi.Content = _d.GetSObjectDef(s).label;
// hard code overide for the Group versus Queue
// can't work out how this is filtered and where you can find it in the object definition or layout
// definition just says "Group" but UI says Queue and shows Groups where Type = Queue - odd!
// also the Type is returned as Queue from the SOQL
if (s == "Group")
{
cbi.Tag = "Queue";
cbi.Content = "Queue";
}
o1.Items.Add(cbi);
}
//set to the first one *might be a default - should use that
_type = f.referenceTo[0];
_typeName = _d.GetSObjectDef(_type).label;
//Set special filter
acb1.FilteringBehavior = new ShowAllFilteringBehavior();
_gotdata = false;
_triggerevents = true;
}
开发者ID:santoshsaha,项目名称:AxiomCS-Ribbon01,代码行数:51,代码来源:AxSearchBox.xaml.cs
注:本文中的RadComboBoxItem类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论