本文整理汇总了C#中System.Web.UI.WebControls.RepeaterItem类的典型用法代码示例。如果您正苦于以下问题:C# RepeaterItem类的具体用法?C# RepeaterItem怎么用?C# RepeaterItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RepeaterItem类属于System.Web.UI.WebControls命名空间,在下文中一共展示了RepeaterItem类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetSearchResultHighlight
protected string GetSearchResultHighlight(RepeaterItem rptItem)
{
string searchHiglight = string.Empty;
var sr = (SearchResult)rptItem.DataItem;
if (sr.Fields.ContainsKey("hTMLContent"))
{
searchHiglight = ExtensionMethods.GetHighlight(sr.Fields["hTMLContent"], LuceneIndex,
string.Format(GeneratedQuery,SearchTerm), "hTMLContent");
}
else if (sr.Fields.ContainsKey("description"))
{
searchHiglight = ExtensionMethods.GetHighlight(sr.Fields["description"], LuceneIndex,
string.Format(GeneratedQuery, SearchTerm), "description");
}
else if (sr.Fields.ContainsKey("copy"))
{
searchHiglight = ExtensionMethods.GetHighlight(sr.Fields["copy"], LuceneIndex,
string.Format(GeneratedQuery, SearchTerm), "copy");
}
else if (sr.Fields.ContainsKey("bodyText"))
{
searchHiglight = ExtensionMethods.GetHighlight(sr.Fields["bodyText"], LuceneIndex,
string.Format(GeneratedQuery, SearchTerm), "bodyText");
}
return searchHiglight;
}
开发者ID:clickpunch,项目名称:BrandCenterSearchResults,代码行数:28,代码来源:BrandCenterSearchResults.ascx.cs
示例2: IsHidden
protected String IsHidden(RepeaterItem item)
{
DataRowView drv = (DataRowView)item.DataItem;
return (((drv.Row["GPI"].ToString() == ThisSession.DrugGPI) &&
(drv.Row["QuantityUOM"].ToString().Replace("\n","").Replace("\r","") == ThisSession.DrugQuantityUOM)) ?
"" : "hidden");
}
开发者ID:reydavid47,项目名称:GITHUB,代码行数:7,代码来源:results_rx_name.aspx.cs
示例3: ListItemEventArgs
public ListItemEventArgs(ListItemBase listItem) {
if(listItem == null) {
throw new ArgumentNullException("listItem");
}
this.listItem = listItem;
this.listItemObject = listItem.ListItem;
this.listingObject = listItem.ListingObject;
this.repeaterItem = listItem.RepeaterItem;
this.itemIndex = listItem.ItemIndex;
}
开发者ID:aelveborn,项目名称:njupiter,代码行数:10,代码来源:ListItemEventHandler.cs
示例4: IsNewGroupItem
/// <summary>
/// Checks the current item to see if it differs from the previous item
/// </summary>
/// <param name="item">item to be checked</param>
/// <returns><c>true</c> if this item is different from the previous</returns>
/// <remarks>Calling this method again on the same item will always return false</remarks>
public bool IsNewGroupItem(RepeaterItem item) {
//See if this is a data item with a new value
if ((item.ItemType == ListItemType.Item || item.ItemType == ListItemType.AlternatingItem)
&& item.DataItem != null && _comparer.Compare(lastvalue, item.DataItem) != 0) {
//remeber this value
lastvalue = item.DataItem;
return true;
}
return false;
}
开发者ID:xcrash,项目名称:cuyahogacontrib-Cuyahoga.Modules.ECommerce,代码行数:19,代码来源:GroupedRepeater.cs
示例5: getReturnData
/// <summary>
/// 生成要返回的数据(附加在tr里的数据)
/// </summary>
protected string getReturnData(RepeaterItem repeaterItem)
{
string[] fieldNames = this.hidFieldNames.Value.Trim().Split('|');
StringBuilder sb = new StringBuilder();
foreach (string fieldName in fieldNames)
{
sb.Append(" data-")
.Append(fieldName)
.Append("=\"")
.Append(Server.HtmlEncode(DataBinder.Eval(repeaterItem.DataItem, fieldName).ToString()))
.Append("\" ");
}
return sb.ToString();
}
开发者ID:jongking,项目名称:XueXiaoWeiXin,代码行数:17,代码来源:User-Select-One.aspx.cs
示例6: InstantiateEmptyTemplate
private void InstantiateEmptyTemplate()
{
if (itemsCreated == 0 && EmptyTemplate != null)
{
System.Web.UI.WebControls.RepeaterItem ri = new System.Web.UI.WebControls.RepeaterItem(0, System.Web.UI.WebControls.ListItemType.Header);
EmptyTemplate.InstantiateIn(ri);
Controls.Add(ri);
OnItemCreated(new System.Web.UI.WebControls.RepeaterItemEventArgs(ri));
if (useDataSource)
{
ri.DataBind();
OnItemDataBound(new System.Web.UI.WebControls.RepeaterItemEventArgs(ri));
}
}
}
开发者ID:grbbod,项目名称:drconnect-jungo,代码行数:15,代码来源:Repeater.cs
示例7: SetRowValue
public void SetRowValue(bool otherBreak, int index, string value, Repeater rpt, RepeaterItem item, string controlId, string width)
{
if (this._value == null)
{
Init(index, value);
if (_total == 1)
{
Literal ltr = (Literal)item.FindControl(controlId);
ltr.Text = " <td align=\"center\" style=\"width:" + width + "\">" + _value + "</td>";
}
}
else
{
if (index == _total - 1 || index == _pageSize - 1)
{
if (value != this._value || otherBreak)
{
Literal ltr = (Literal)rpt.Items[_index].FindControl(controlId);
ltr.Text = " <td align=\"center\" style=\"width:" + width + "\"" + (_rowCount > 1 ? " rowspan=" + _rowCount : "") + ">" + _value + "</td>";
ltr = (Literal)item.FindControl(controlId);
ltr.Text = " <td align=\"center\" style=\"width:" + width + "\">" + value + "</td>";
}
else
{
_rowCount++;
Literal ltr = (Literal)rpt.Items[_index].FindControl(controlId);
ltr.Text = " <td align=\"center\" style=\"width:" + width + "\"" + (_rowCount > 1 ? " rowspan=" + _rowCount : "") + ">" + _value + "</td>";
}
}
else
if (value != this._value || otherBreak)
{
Literal ltr = (Literal)rpt.Items[_index].FindControl(controlId);
ltr.Text = " <td align=\"center\" style=\"width:" + width + "\"" + (_rowCount > 1 ? " rowspan=" + _rowCount : "") + ">" + _value + "</td>";
Init(index, value);
}
else
{
_rowCount++;
}
}
}
开发者ID:tuankyo,项目名称:QLTN,代码行数:42,代码来源:RepeaterRowSpan.cs
示例8: InitializeItem
protected virtual void InitializeItem (RepeaterItem item)
{
ITemplate t = null;
switch (item.ItemType) {
case ListItemType.Header:
t = HeaderTemplate;
break;
case ListItemType.Footer:
t = FooterTemplate;
break;
case ListItemType.Item:
t = ItemTemplate;
break;
case ListItemType.AlternatingItem:
t = AlternatingItemTemplate;
if (t == null)
t = ItemTemplate;
break;
case ListItemType.Separator:
t = SeparatorTemplate;
break;
}
if (t != null)
t.InstantiateIn (item);
}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:27,代码来源:Repeater.cs
示例9: SetBannerRowValue
public void SetBannerRowValue(int index, string value, Repeater rpt, RepeaterItem item, string controlId, string sumRowId)
{
if (this._value == null)
{
Init(index, value);
if (_total == 1)
{
Literal ltr = (Literal)item.FindControl(controlId);
ltr.Text = " <td align=\"center\">" + _value + "</td>";
}
}
else
{
if (index == _total - 1)
{
if (value != this._value)
{
if (_rowCount > 1 && index > 0)
{
_rowCount++;
Literal ltr = (Literal)rpt.Items[_index].FindControl(controlId);
ltr.Text = " <td align=\"center\" " + (_rowCount > 1 ? " rowspan=" + _rowCount : "") + ">" + _value + "</td>";
ltr = (Literal)item.FindControl(controlId);
ltr.Text = " <td align=\"center\" rowspan=\"1\">" + value + "</td>";
ltr = (Literal)rpt.Items[index - 1].FindControl(sumRowId);
ltr.Text = GetBannerData(rpt, _rowCount, index);
}
else
{
Literal ltr = (Literal)rpt.Items[_index].FindControl(controlId);
ltr.Text = " <td align=\"center\" " + (_rowCount > 1 ? " rowspan=" + _rowCount : "") + ">" + _value + "</td>";
ltr = (Literal)item.FindControl(controlId);
ltr.Text = " <td align=\"center\">" + value + "</td>";
}
}
else
{
_rowCount++;
if (_rowCount > 1 && index > 0)
{
_rowCount++;
Literal ltr = (Literal)rpt.Items[_index].FindControl(controlId);
ltr.Text = " <td align=\"center\" " + (_rowCount > 1 ? " rowspan=" + _rowCount : "") + ">" + _value + "</td>";
ltr = (Literal)item.FindControl(sumRowId); //last record
ltr.Text = GetBannerData(rpt, _rowCount, index, item);
}
else
{
Literal ltr = (Literal)rpt.Items[_index].FindControl(controlId);
ltr.Text = " <td align=\"center\" " + (_rowCount > 1 ? " rowspan=" + _rowCount : "") + ">" + _value + "</td>";
}
}
}
else
if (value != this._value)
{
if (_rowCount > 1 && index > 0)
{
_rowCount++;
Literal ltr = (Literal)rpt.Items[_index].FindControl(controlId);
ltr.Text = " <td align=\"center\" " + (_rowCount > 1 ? " rowspan=" + _rowCount : "") + ">" + _value + "</td>";
ltr = (Literal)rpt.Items[index - 1].FindControl(sumRowId);
ltr.Text = GetBannerData(rpt, _rowCount, index);
}
else
{
Literal ltr = (Literal)rpt.Items[_index].FindControl(controlId);
ltr.Text = " <td align=\"center\" " + (_rowCount > 1 ? " rowspan=" + _rowCount : "") + ">" + _value + "</td>";
}
Init(index, value);
}
else
{
_rowCount++;
}
}
}
开发者ID:tuankyo,项目名称:QLTN,代码行数:78,代码来源:RepeaterRowSpan.cs
示例10: InitializeItem
protected virtual new void InitializeItem(RepeaterItem item)
{
}
开发者ID:asvishnyakov,项目名称:CodeContracts,代码行数:3,代码来源:System.Web.UI.WebControls.Repeater.cs
示例11: GetParaCondition
private CategoryConditionModel GetParaCondition(int scenceId, int cateId, RepeaterItem item)
{
CategoryConditionModel ccmodel = null;
Label lblPropName = item.FindControl("lblPropName") as Label;
CheckBoxList cblPara = item.FindControl("cblPara") as CheckBoxList;
List<string> selvals = new List<string>();
foreach (ListItem sitem in cblPara.Items)
{
if (sitem.Selected)
selvals.Add("'" + sitem.Value + "'");
}
if (selvals.Count > 0)
{
string rulvals = String.Join(",", selvals.ToArray());
ccmodel = new CategoryConditionModel(scenceId, cateId, int.Parse(lblPropName.ToolTip), rulvals);
}
return ccmodel;
}
开发者ID:ViniciusConsultor,项目名称:noname-netshop,代码行数:18,代码来源:ShowClassicalDetail.aspx.cs
示例12: rptJobSummaryResources_ItemDataBound
public void rptJobSummaryResources_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
JobSummaryResourceRepeaterItem = e.Item;
_presenter.FillJobSummaryResourceRow();
}
}
开发者ID:danilocecilia,项目名称:HulcherProject,代码行数:8,代码来源:Dashboard.aspx.cs
示例13: RepeaterItemEventArgs
public RepeaterItemEventArgs(RepeaterItem item)
{
}
开发者ID:asvishnyakov,项目名称:CodeContracts,代码行数:3,代码来源:System.Web.UI.WebControls.RepeaterItemEventArgs.cs
示例14: GetRole
protected string GetRole(RepeaterItem repeaterItem)
{
return (string)((RepeaterItem)repeaterItem.Parent.Parent).DataItem;
}
开发者ID:andy4711,项目名称:n2cms,代码行数:4,代码来源:Default.aspx.cs
示例15: SetRowControl
public void SetRowControl(bool otherBreak, int index, string value, Repeater rpt, RepeaterItem item, string controlId, string id)
{
if (this._value == null)
{
Init(index, value);
if (_total == 1)
{
Literal ltr = (Literal)item.FindControl(controlId);
ltr.Text = " <td align=\"center\">" + "";
((Control)item.FindControl(id)).Visible = true;
}
}
else
{
if (index == _total - 1)
{
if (value != this._value || otherBreak)
{
Literal ltr = (Literal)rpt.Items[_index].FindControl(controlId);
ltr.Text = " <td align=\"center\" " + (_rowCount > 1 ? " rowspan=" + _rowCount : "") + ">" + "";
((Control)rpt.Items[_index].FindControl(id)).Visible = true;
ltr = (Literal)item.FindControl(controlId);
ltr.Text = " <td align=\"center\">" + "";
((Control)item.FindControl(id)).Visible = true;
}
else
{
_rowCount++;
Literal ltr = (Literal)rpt.Items[_index].FindControl(controlId);
ltr.Text = " <td align=\"center\" " + (_rowCount > 1 ? " rowspan=" + _rowCount : "") + ">" + "";
((Control)rpt.Items[_index].FindControl(id)).Visible = true;
}
}
else
if (value != this._value || otherBreak)
{
Literal ltr = (Literal)rpt.Items[_index].FindControl(controlId);
ltr.Text = " <td align=\"center\" " + (_rowCount > 1 ? " rowspan=" + _rowCount : "") + ">" + "";
((Control)rpt.Items[_index].FindControl(id)).Visible = true;
Init(index, value);
}
else
{
_rowCount++;
}
}
}
开发者ID:tuankyo,项目名称:QLTN,代码行数:52,代码来源:RepeaterRowSpan.cs
示例16: RepeaterItemEventArgs
/// <devdoc>
/// <para>Initializes a new instance of the <see cref='System.Web.UI.WebControls.RepeaterItemEventArgs'/> class.</para>
/// </devdoc>
public RepeaterItemEventArgs(RepeaterItem item) {
this.item = item;
}
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:6,代码来源:RepeaterItemEventArgs.cs
示例17: VisibleUnvisibleControl
private void VisibleUnvisibleControl(bool value, RepeaterItem selectedRptItem)
{
((Label)selectedRptItem.FindControl("lblLabourType")).Visible = !value;
((TextBox)selectedRptItem.FindControl("txtLabourType")).Visible = value;
((Label)selectedRptItem.FindControl("lblSector")).Visible = !value;
((DropDownList)selectedRptItem.FindControl("ddlSector")).Visible = value;
((Label)selectedRptItem.FindControl("lblIsVerify")).Visible = !value;
((CheckBox)selectedRptItem.FindControl("chkIsVerify")).Visible = value;
((Button)selectedRptItem.FindControl("btnEdit")).Visible = !value;
((Button)selectedRptItem.FindControl("btnDelete")).Visible = !value;
if (((LinkButton)selectedRptItem.FindControl("lbtnInsert")).Visible == true)
{
((LinkButton)selectedRptItem.FindControl("lbtnUpdate")).Visible = !value;
//((Button)selectedRptItem.FindControl("btnDelete")).Visible = !value;
((LinkButton)selectedRptItem.FindControl("lbtnCancel")).Visible = value;
}
else
{
((LinkButton)selectedRptItem.FindControl("lbtnUpdate")).Visible = value;
//((Button)selectedRptItem.FindControl("btnDelete")).Visible = value;
((LinkButton)selectedRptItem.FindControl("lbtnCancel")).Visible = value;
}
}
开发者ID:AAGJKPRT,项目名称:LMT,代码行数:25,代码来源:LabourType.ascx.cs
示例18: RaiseRepeaterEvent
/// <summary>
/// Raises the repeater event.
/// </summary>
/// <param name="item">The item.</param>
/// <param name="ev">The ev.</param>
private void RaiseRepeaterEvent(RepeaterItem item, ViewEventHandler ev)
{
this._CurrentGroup = this.GLMinorCategoryActivityGroups[item.ItemIndex];
this._currentMinorCategoriesControl = item.FindControl("MinorCategoryDropDown") as MultiSelectDropDown;
this._currentActivityTypesControl = item.FindControl("ActivityTypeDropDown") as MultiSelectDropDown;
ev();
}
开发者ID:rsdgjb,项目名称:GRP_PERFICIENT,代码行数:12,代码来源:MinorCategoryActivityTypes.ascx.cs
示例19: ChangeRowVisibility
private void ChangeRowVisibility(RepeaterItem item, string trName, bool visibility)
{
HtmlTableRow row = (HtmlTableRow)item.FindControl(trName);
if (null != row) row.Visible = visibility;
}
开发者ID:danilocecilia,项目名称:HulcherProject,代码行数:5,代码来源:Dashboard.aspx.cs
示例20: ChangeCallLogRepeaterColumnVisibility
private void ChangeCallLogRepeaterColumnVisibility(RepeaterItem item, string colName, bool visibility)
{
HtmlTableCell cell = (HtmlTableCell)item.FindControl(colName);
if (null != cell) cell.Visible = visibility;
}
开发者ID:danilocecilia,项目名称:HulcherProject,代码行数:5,代码来源:Dashboard.aspx.cs
注:本文中的System.Web.UI.WebControls.RepeaterItem类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论