当前位置: 首页>>代码示例>>C#>>正文


C# ListItemType类代码示例

本文整理汇总了C#中ListItemType的典型用法代码示例。如果您正苦于以下问题:C# ListItemType类的具体用法?C# ListItemType怎么用?C# ListItemType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ListItemType类属于命名空间,在下文中一共展示了ListItemType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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 = "&nbsp;";
				break;
			case ListItemType.EditItem:
				t = EditItemTemplate;
				if (t == null)
					t = ItemTemplate;
				if (t == null)
					cell.Text = "&nbsp;";
				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


注:本文中的ListItemType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。