本文整理汇总了C#中RadComboBoxItemsRequestedEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# RadComboBoxItemsRequestedEventArgs类的具体用法?C# RadComboBoxItemsRequestedEventArgs怎么用?C# RadComboBoxItemsRequestedEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RadComboBoxItemsRequestedEventArgs类属于命名空间,在下文中一共展示了RadComboBoxItemsRequestedEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: atiRadComboBoxSearchMessageInbox_ItemsRequested
protected void atiRadComboBoxSearchMessageInbox_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
// TODO: we need to search "reply" text and add those messages to the results.
RadComboBox atiRadComboBoxSearchMessageInbox = (RadComboBox)sender;
atiRadComboBoxSearchMessageInbox.Items.Clear();
const int TAKE = 5;
aqufitEntities entities = new aqufitEntities();
int itemOffset = e.NumberOfItems;
IQueryable<Message> messagesQuery = entities.MessageRecipiants.Where( m => m.UserSettingsKey == this.UserSettings.Id ).Select( m => m.Message ).OrderBy(m => m.DateTime);
int length = messagesQuery.Count();
messagesQuery = string.IsNullOrEmpty(e.Text) ? messagesQuery.Where(m => m.UserSetting.Id != this.UserSettings.Id).Skip(itemOffset).Take(TAKE) : messagesQuery.Where(m => m.UserSetting.Id != this.UserSettings.Id && m.Subject.ToLower().Contains(e.Text) || m.Text.ToLower().Contains(e.Text)).Skip(itemOffset).Take(TAKE);
Message[] messages = messagesQuery.ToArray();
foreach (Message m in messages)
{
RadComboBoxItem item = new RadComboBoxItem(m.Subject);
item.Value = "" + m.Id;
// item.ImageUrl = ResolveUrl("~/DesktopModules/ATI_Base/services/images/profile.aspx") + "?u=" + g.UserKey + "&p=" + g.PortalKey;
atiRadComboBoxSearchMessageInbox.Items.Add(item);
}
int endOffset = Math.Min(itemOffset + TAKE + 1, length);
e.EndOfItems = endOffset == length;
e.Message = (length <= 0) ? "No matches" : String.Format("Items <b>1</b>-<b>{0}</b> of {1}", endOffset, length);
}
示例2: list_ItemsRequested
private void list_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
((RadComboBox)o).DataTextField = this.DataField;
((RadComboBox)o).DataValueField = this.DataField;
((RadComboBox)o).DataSource = BLL.Users.DataSource();
((RadComboBox)o).DataBind();
}
示例3: atiRadComboBoxSearchFollower_ItemsRequested
protected void atiRadComboBoxSearchFollower_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
/*
RadComboBox atiRadComboSearchFriends = (RadComboBox)sender;
atiRadComboSearchFriends.Items.Clear();
const int TAKE = 5;
aqufitEntities entities = new aqufitEntities();
long[] friendIds = entities.UserFriends.Where(f => (f.SrcUserSettingKey == this.ProfileSettings.Id) && f.Relationship == (int)Affine.Utils.ConstsUtil.Relationships.FOLLOW).Select(f => f.SrcUserSettingKey == this.ProfileSettings.Id ? f.DestUserSettingKey : f.SrcUserSettingKey).ToArray();
int itemOffset = e.NumberOfItems;
IQueryable<User> friends = entities.UserSettings.OfType<User>().Where(Affine.Utils.Linq.LinqUtils.BuildContainsExpression<User, long>(w => w.Id, friendIds)).OrderBy(w => w.UserName);
int length = friends.Count();
friends = string.IsNullOrEmpty(e.Text) ? friends.Skip(itemOffset).Take(TAKE) : friends.Where(w => w.UserName.ToLower().StartsWith(e.Text) || w.UserFirstName.ToLower().StartsWith(e.Text) || w.UserLastName.ToLower().StartsWith(e.Text)).Skip(itemOffset).Take(TAKE);
User[] users = friends.ToArray();
foreach (User u in users)
{
RadComboBoxItem item = new RadComboBoxItem(u.UserFirstName + " (" + u.UserFirstName + " " + u.UserLastName + ")");
item.Value = "" + u.UserName;
item.ImageUrl = ResolveUrl("~/DesktopModules/ATI_Base/services/images/profile.aspx") + "?u=" + u.UserKey + "&p=" + u.PortalKey;
atiRadComboSearchFriends.Items.Add(item);
}
int endOffset = Math.Min(itemOffset + TAKE + 1, length);
e.EndOfItems = endOffset == length;
e.Message = (length <= 0) ? "No matches" : String.Format("Items <b>1</b>-<b>{0}</b> of {1}", endOffset, length);
*/
}
示例4: list_ItemsRequested
private void list_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
((RadComboBox)o).DataTextField = DataField;
((RadComboBox)o).DataValueField = DataField;
((RadComboBox)o).DataSource = GetDataTable("SELECT DISTINCT " + UniqueName + " FROM Customers WHERE " + UniqueName + " LIKE '" + e.Text + "%'");
((RadComboBox)o).DataBind();
}
示例5: drpBoard_ItemsRequested
protected void drpBoard_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
DataSet ds = objglcode.fetchComboData("FETCH_ALL_GL_CODE_FOR_REPORT", e.Text);
DataTable dt = ds.Tables[0];
onitemrequest(drpBoard, dt, e.NumberOfItems);
}
示例6: OnDropdownCompany_ItemsRequested
protected void OnDropdownCompany_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
string companyName = e.Text;
if (!string.IsNullOrEmpty(companyName))
{
List<Company> list = new CompanyRepository().FindByName(companyName);
ddlCompany.DataSource = list;
ddlCompany.DataBind();
}
}
示例7: RadComboBox1_ItemsRequested1
protected void RadComboBox1_ItemsRequested1(object sender, RadComboBoxItemsRequestedEventArgs e)
{
if (e.Text == "") return;
RadComboBox combo = (RadComboBox)sender;
var rs = from p in ctx.Patients
where p.FullName.StartsWith(e.Text)
select p;
foreach (Patient pat in rs)
{
combo.Items.Add(new RadComboBoxItem(pat.FullName, pat.PersonId.ToString()));
}
}
示例8: OnDropdownCandidate_ItemsRequested
protected void OnDropdownCandidate_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
{
string name = e.Text;
if (!string.IsNullOrEmpty(name))
{
if(name.Length >= 3)
{
List<Candidate> list = new CandidateRepository().SearchCandidatesOnName(name);
ddlCandidate.DataTextField = "FullName";
ddlCandidate.DataValueField = "CandidateId";
ddlCandidate.DataSource = list;
ddlCandidate.DataBind();
}
}
}
示例9: ddlSchoolType_ItemsRequested
//private const string CompetencyTrackingReport = "Competency Tracking Report";
//private const string CompetencyTrackingReport_NoSpaces = "CompetencyTrackingReport";
#region search criteria event
protected void ddlSchoolType_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
this.ddlSchoolType.DataSource = null;
this.ddlSchoolType.DataBind();
if (this.SessionObject != null && this.SessionObject.LoggedInUser != null)
{
var loggedInUser = this.SessionObject.LoggedInUser;
if (loggedInUser.Roles != null && loggedInUser.Roles.Any())
{
this.ddlSchoolType.DataSource = this.ViewModel.GetAllSchoolType(loggedInUser).Select(c => new { Text = string.Format("{0}", c.Name), Value = c.Name });
this.ddlSchoolType.DataBind();
}
}
}
示例10: RadComboBox2_ItemsRequested
protected void RadComboBox2_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
DataTable data = Peerfx_DB.SPs.ViewUsersAllAdminDeposits(e.Text).GetDataSet().Tables[0];
int itemOffset = e.NumberOfItems;
int endOffset = Math.Min(itemOffset + 10, data.Rows.Count);
e.EndOfItems = endOffset == data.Rows.Count;
RadComboBox rdc = (RadComboBox)sender;
for (int i = itemOffset; i < endOffset; i++)
{
rdc.Items.Add(new RadComboBoxItem(data.Rows[i]["user_info_full"].ToString(), data.Rows[i]["user_key"].ToString()));
}
//e.Message = GetStatusMessage(endOffset, data.Rows.Count);
}
示例11: 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();
}
}
}
示例12: 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();
}
}
}
示例13: 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();
}
}
}
示例14: atiRadComboBoxSearchRoutes_ItemsRequested
protected void atiRadComboBoxSearchRoutes_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
RadComboBox atiRadComboSearchWorkouts = (RadComboBox)sender;
atiRadComboSearchWorkouts.Items.Clear();
const int TAKE = 5;
aqufitEntities entities = new aqufitEntities();
int itemOffset = e.NumberOfItems;
IQueryable<MapRoute> routes = entities.User2MapRouteFav.Where(r => r.UserSettingsKey == UserSettings.Id).Select(w => w.MapRoute);
routes = routes.OrderBy(r => r.Name);
int length = routes.Count();
routes = string.IsNullOrEmpty(e.Text) ? routes.Skip(itemOffset).Take(TAKE) : routes.Where(r => r.Name.ToLower().StartsWith(e.Text)).Skip(itemOffset).Take(TAKE);
MapRoute[] routeArray = routes.ToArray();
foreach (MapRoute r in routeArray)
{
RadComboBoxItem item = new RadComboBoxItem(r.Name);
item.Value = "" + r.Id;
atiRadComboSearchWorkouts.Items.Add(item);
}
int endOffset = Math.Min(itemOffset + TAKE + 1, length);
e.EndOfItems = endOffset == length;
e.Message = (length <= 0) ? "No matches" : String.Format("Items <b>1</b>-<b>{0}</b> of {1}", endOffset, length);
}
示例15: GetAllInvoiceTypes_Selecting
protected void GetAllInvoiceTypes_Selecting(object sender, RadComboBoxItemsRequestedEventArgs e)
{
DataClasses1DataContext dbContext = new DataClasses1DataContext();
RadComboBox rcbInvoiceType = ((RadComboBox)sender);
rcbInvoiceType.Items.Clear();
var types = from tp in dbContext.InvoiceTypes
select new { Key = tp.ID, Value = tp.InvoiceTypeName };
rcbInvoiceType.DataSource = types;
rcbInvoiceType.DataBind();
}