本文整理汇总了C#中ListItemType类的典型用法代码示例。如果您正苦于以下问题:C# ListItemType类的具体用法?C# ListItemType怎么用?C# ListItemType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ListItemType类属于命名空间,在下文中一共展示了ListItemType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: LanguagesTemplateDropDown
public LanguagesTemplateDropDown(ListItemType type, string colName, CultureTypes types)
{
this.templateType = type;
// this.columnName = colName;
this.cultureTypes = types;
}
开发者ID:divyang4481,项目名称:appleseedapp,代码行数:7,代码来源:LanguagesTemplateDropDown.cs
示例2: InitializeCell
/// <summary>
/// Overridden to replace the button with a confirmed button
/// </summary>
public override void InitializeCell(TableCell cell, int columnIndex, ListItemType itemType)
{
base.InitializeCell(cell, columnIndex, itemType);
if ( itemType != ListItemType.Footer && itemType != ListItemType.Header ) {
WebControl theButton = null;
if ( this.ButtonType == ButtonColumnType.LinkButton ) {
ConfirmedLinkButton theLinkButton = new ConfirmedLinkButton();
theLinkButton.Text = this.Text;
theLinkButton.CommandName = this.CommandName;
theLinkButton.CausesValidation = false;
theLinkButton.Message = this.Message;
theLinkButton.ID = theLinkButton.ClientID;
theButton = theLinkButton;
} else {
ConfirmedButton theNormalButton = new ConfirmedButton();
theNormalButton.Text = this.Text;
theNormalButton.CommandName = this.CommandName;
theNormalButton.CausesValidation = false;
theNormalButton.Message = this.Message;
theNormalButton.ID = theNormalButton.ClientID;
theButton = theNormalButton;
}
if (this.DataTextField.Length != 0) {
theButton.DataBinding += new EventHandler( OnDataBindColumn );
}
cell.Controls.Clear();
cell.Controls.Add(theButton);
}
}
开发者ID:bnantz,项目名称:NCS-V1-1,代码行数:35,代码来源:ConfirmedButtonColumn.cs
示例3: InitializeCell
public override void InitializeCell (TableCell cell, int columnIndex, ListItemType itemType)
{
base.InitializeCell (cell, columnIndex, itemType);
ITemplate t = null;
switch (itemType) {
case ListItemType.Header:
t = HeaderTemplate;
break;
case ListItemType.Footer:
t = FooterTemplate;
break;
case ListItemType.Item:
case ListItemType.AlternatingItem:
case ListItemType.SelectedItem:
t = ItemTemplate;
if (t == null)
cell.Text = " ";
break;
case ListItemType.EditItem:
t = EditItemTemplate;
if (t == null)
t = ItemTemplate;
if (t == null)
cell.Text = " ";
break;
}
if (t != null)
t.InstantiateIn (cell);
}
开发者ID:nobled,项目名称:mono,代码行数:30,代码来源:TemplateColumn.cs
示例4: InitializeCell
public override void InitializeCell(TableCell cell, int columnIndex, ListItemType itemType)
{
base.InitializeCell(cell, columnIndex, itemType);
Control bindCtrl = null;
Control toAdd = null;
switch(itemType)
{
case ListItemType.Item : goto case ListItemType.SelectedItem;
case ListItemType.AlternatingItem
: goto case ListItemType.SelectedItem;
case ListItemType.SelectedItem
: if(DataField.Length != 0)
bindCtrl = cell;
break;
case ListItemType.EditItem
: if(!ReadOnly)
{
TextBox box = new TextBox();
toAdd = box;
if(DataField.Length != 0)
bindCtrl = box;
} else
goto case ListItemType.SelectedItem;
break;
}
if(toAdd != null)
cell.Controls.Add(toAdd);
if(bindCtrl != null)
bindCtrl.DataBinding += new EventHandler(OnDataBindColumn);
//throw new NotImplementedException();
}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:33,代码来源:BoundColumn.cs
示例5: CreateTemplate
/// <Summary>Creates a TextColumnTemplate</Summary>
/// <Returns>A TextColumnTemplate</Returns>
private TextColumnTemplate CreateTemplate( ListItemType type )
{
bool isDesignMode = false;
if (HttpContext.Current == null)
{
isDesignMode = true;
}
TextColumnTemplate template = new TextColumnTemplate(type);
if (type != ListItemType.Header)
{
template.DataField = DataField;
}
template.Width = Width;
if (type == ListItemType.Header)
{
template.Text = this.HeaderText;
}
else
{
template.Text = Text;
}
template.DesignMode = isDesignMode;
return template;
}
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:30,代码来源:TextColumn.cs
示例6: InitializeCell
public override void InitializeCell(TableCell cell, int columnIndex, ListItemType itemType)
{
base.InitializeCell(cell, columnIndex, itemType);
if (Enum.IsDefined(typeof(ListItemType), itemType) &&
itemType != ListItemType.Footer &&
itemType != ListItemType.Header)
{
WebControl toDisplay = null;
if(ButtonType == ButtonColumnType.PushButton)
{
Button b = new Button();
b.Text = Text;
b.CommandName = CommandName;
b.CausesValidation = false;
toDisplay = b;
} else
{
LinkButton lb = new DataGridLinkButton();
lb.Text = Text;
lb.CommandName = CommandName;
lb.CausesValidation = false;
toDisplay = lb;
}
if(DataTextField.Length > 0)
{
toDisplay.DataBinding += new EventHandler(OnDataBindButtonColumn);
}
cell.Controls.Add(toDisplay);
}
}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:30,代码来源:ButtonColumn.cs
示例7: GridViewTemplate
public GridViewTemplate(ListItemType itemType, string headerName, string typeName, EnumInfoType infoType)
{
this.itemType = itemType;
this.headerName = headerName;
this.typeName = typeName;
this.infoType = infoType;
}
开发者ID:jmptrader,项目名称:Switch-Transaccional,代码行数:7,代码来源:GridViewTemplated.cs
示例8: CreateItemTemplate
//Parameterised Constructor
public CreateItemTemplate(ListItemType item,string lectureID,string date,string text)
{
myListItemType = item;
this.lectureID = lectureID;
this.date = date;
this.text = text;
}
开发者ID:priyanshu92,项目名称:AttendanceManagementSystem,代码行数:8,代码来源:CreateItemTemplate.cs
示例9: InitializeCell
public override void InitializeCell(TableCell cell, int columnIndex, ListItemType itemType)
{
base.InitializeCell(cell, columnIndex, itemType);
if ((itemType != ListItemType.Header) && (itemType != ListItemType.Footer))
{
WebControl child = null;
if (this.ButtonType == ButtonColumnType.LinkButton)
{
LinkButton button = new DataGridLinkButton {
Text = this.Text,
CommandName = this.CommandName,
CausesValidation = this.CausesValidation,
ValidationGroup = this.ValidationGroup
};
child = button;
}
else
{
Button button2 = new Button {
Text = this.Text,
CommandName = this.CommandName,
CausesValidation = this.CausesValidation,
ValidationGroup = this.ValidationGroup
};
child = button2;
}
if (this.DataTextField.Length != 0)
{
child.DataBinding += new EventHandler(this.OnDataBindColumn);
}
cell.Controls.Add(child);
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:33,代码来源:ButtonColumn.cs
示例10: ScrollDataGrid
public ScrollDataGrid(Label lblcol, string colnameval, int colnoval, ListItemType itype)
{
lbl = lblcol;
colname = colnameval;
colno = colnoval;
itemtype = itype;
}
开发者ID:Dharmendrakothe89,项目名称:aishinfo,代码行数:7,代码来源:ScrollDataGrid.cs
示例11: DownloadColumnTemplate
public DownloadColumnTemplate (string id, string caption, ListItemType itemType) {
mobjTemplateType = itemType;
mstrID = id;
mstrCaption = caption;
if (mstrCaption == string.Empty) {
mstrCaption = "Download";
}
}
开发者ID:roman-yagodin,项目名称:R7.Documents,代码行数:8,代码来源:DownloadColumnTemplate.cs
示例12: GetItemStyle
protected override Style GetItemStyle (ListItemType itemType, int repeatIndex)
{
Style s = new Style ();
s.BackColor = Color.Red;
s.BorderStyle = BorderStyle.Solid;
WebTest.CurrentTest.UserData = "GetItemStyle";
return s;
}
开发者ID:Profit0004,项目名称:mono,代码行数:8,代码来源:RadioButtonListTest.cs
示例13: RenderItem
protected override void RenderItem(ListItemType itemType, int repeatIndex, RepeatInfo repeatInfo, HtmlTextWriter writer)
{
ListItem listItem = this.Items[repeatIndex];
if (_UnderlyingCheckbox != null) {
_UnderlyingCheckbox.InputAttributes["value"] = listItem.Value;
}
base.RenderItem(itemType, repeatIndex, repeatInfo, writer);
}
开发者ID:Mariamfelicia,项目名称:nreco,代码行数:8,代码来源:CheckBoxList.cs
示例14: CreateItem
protected override RepeaterItem CreateItem(int itemIndex, ListItemType itemType) {
if (itemType == ListItemType.Item || itemType == ListItemType.AlternatingItem) { //Plus others??
RowIdRepeaterItem item = new RowIdRepeaterItem(itemIndex, itemType);
item.DataBinding += new EventHandler(item_DataBinding);
return item;
} else {
return base.CreateItem (itemIndex, itemType);
}
}
开发者ID:xcrash,项目名称:cuyahogacontrib-Cuyahoga.Modules.ECommerce,代码行数:9,代码来源:RowIdRepeater.cs
示例15: AddList
public void AddList(string[] listItems, ListItemType itemType)
{
var list = this.document.AddList(null, 0, itemType);
foreach (var item in listItems)
{
this.document.AddListItem(list, item);
}
this.document.InsertList(list);
}
开发者ID:alex687,项目名称:SoftUni-Homeworks,代码行数:10,代码来源:WordDocumentGenerator.cs
示例16: HPMGridViewTemplate
/// <summary>
///
/// </summary>
/// <param name="mode">Tells us if we're in edit or display mode</param>
/// <param name="type">The type of special control we're adding</param>
/// <param name="colname">The display name of the column</param>
/// <param name="id">The ID of the control we're adding</param>
/// <param name="ddlds">A list of the values we want to bind to the created control</param>
/// <param name="isReadOnly">True if this column is read only, false otherwise</param>
/// <param name="isNumeric">True if this column is numeric, false otherwise</param>
public HPMGridViewTemplate(ListItemType mode, HPMGridViewTemplateType type, string colname, string id, Dictionary<UInt32, string> ddlds, bool isReadOnly, bool isNumeric)
{
m_Mode = mode;
m_ColumnName = colname;
m_ID = id;
m_Type = type;
m_Ddlds = ddlds;
m_IsReadOnly = isReadOnly;
m_IsNumeric = isNumeric;
}
开发者ID:Hansoft,项目名称:hansoft-csharp-sdk-web-sample,代码行数:20,代码来源:HPMGridViewTemplate.cs
示例17: SummaryGridCommandColumn
public SummaryGridCommandColumn(ListItemType itemType, List<UserAction> options = null)
{
this.itemType = itemType;
this.options = new List<UserAction>();
this.options.Add(UserAction.View);
this.options.Add(UserAction.Insert);
this.options.Add(UserAction.Delete);
this.options.Add(UserAction.Multiple);
if (options != null)
this.options = options;
}
开发者ID:rjankovic,项目名称:webminVS2010,代码行数:11,代码来源:SummaryGridCommandColumn.cs
示例18: DynamicFormViewTemplate
public DynamicFormViewTemplate(ListItemType type, DataColumnCollection dccol, bool showEdit)
{
_type = type;
_dccol = dccol;
ShowEdit = showEdit;
_iEditTabOrder = 0;
DataSourceTypeName = new List<string>();
DataSourceSelectMethod = new List<string>();
DropDownListColumns = new List<string>();
DropDownValueField = new List<string>();
DropDownTextField = new List<string>();
DropDownDataSource = new List<object>();
}
开发者ID:fmendes,项目名称:DynamicEditItemTemplate,代码行数:14,代码来源:DynamicFormViewTemplate.cs
示例19: addItemColumnToGrid
/// <summary>
/// Agrega una nueva columna de plantilla al objeto DataGrid
/// </summary>
/// <param name="MyDataGrid">Objeto DataGrid a modificar</param>
/// <param name="myDatatable">Objeto DataTable con los datos</param>
/// <param name="nombreColumna">Nombre de la columna a incluir</param>
/// <param name="control">Control a insertar en la nueva columna</param>
/// <param name="tipo_item">Tipo de control a insertar en la columna</param>
/// <remarks>
/// <list> Creado: Diciembre 10 de 2013 - Ing. David Alejandro Pineda Diaz </list>
/// </remarks>
public static void addItemColumnToGrid(ref DataGrid MyDataGrid, DataTable myDatatable, string nombreColumna, System.Web.UI.Control control, ListItemType tipo_item)
{
try
{
TemplateColumn columna = new TemplateColumn();
columna.HeaderTemplate = new DataGridTemplate(ListItemType.Header, nombreColumna);
columna.ItemTemplate = new DataGridTemplate(tipo_item, control);
MyDataGrid.Columns.Add(columna);
updateGrid(ref MyDataGrid, myDatatable);
}
catch (Exception ex)
{
throw ex;
}
}
开发者ID:DavidPineda,项目名称:RipsValidador,代码行数:27,代码来源:DataGridASP.cs
示例20: InitializeCell
public override void InitializeCell(TableCell cell, int columnIndex, ListItemType itemType)
{
base.InitializeCell(cell, columnIndex, itemType);
if ((itemType != ListItemType.Header) && (itemType != ListItemType.Footer))
{
HyperLink child = new HyperLink {
Text = this.Text,
NavigateUrl = this.NavigateUrl,
Target = this.Target
};
if ((this.DataNavigateUrlField.Length != 0) || (this.DataTextField.Length != 0))
{
child.DataBinding += new EventHandler(this.OnDataBindColumn);
}
cell.Controls.Add(child);
}
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:17,代码来源:HyperLinkColumn.cs
注:本文中的ListItemType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论