• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# DataControlRowState类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



DataControlRowState类属于命名空间,在下文中一共展示了DataControlRowState类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: InitializeCell

        public override void InitializeCell(DataControlFieldCell cell, DataControlCellType cellType, DataControlRowState rowState, int rowIndex)
        {
            base.InitializeCell(cell, cellType, rowState, rowIndex);

            if (ColumnStyle != null)
            {
                if (HeaderStyle.CssClass.IsNullOrEmpty()) HeaderStyle.CssClass = ColumnStyle;
                if (ItemStyle.CssClass.IsNullOrEmpty()) ItemStyle.CssClass = ColumnStyle;
                if (FooterStyle.CssClass.IsNullOrEmpty()) FooterStyle.CssClass = ColumnStyle;
            }

            if (cellType != DataControlCellType.DataCell) return;
            ButtonEx buttonEx = string.IsNullOrEmpty(Message) ? new ButtonEx() : new MessageButton { Message = Message};
            buttonEx.CommandName = CommandName;
            buttonEx.ToolTip = ResourceManager.GetString(ToolTip);
            buttonEx.LeftIconCssClass = IconName == null ? string.Empty : IconName.Name;
            buttonEx.ShowText = false;
            buttonEx.OnClientClick = OnClickClick;
            if (Click != null)
            {
                if (buttonEx is MessageButton)
                    ((MessageButton) buttonEx).Confirm += Click;
                else
                    buttonEx.Click += Click;
            }
            cell.Controls.Add(buttonEx);
        }
开发者ID:erwinbovendeur,项目名称:ADF,代码行数:27,代码来源:IconButtonBase.cs


示例2: InitializeDataCell

 protected override void InitializeDataCell(DataControlFieldCell cell, DataControlRowState rowState)
 {
     //base.InitializeDataCell(cell, rowState);
     TextBox textBox = new TextBox();
     textBox.ID = this.ControlID;
     textBox.Width = new Unit(GridColumn.Width, UnitType.Pixel);
     if (GridColumn.Size != 0) textBox.MaxLength = GridColumn.Size;
     textBox.DataBinding += new EventHandler(this.textBox_DataBinding);
     base.InitializeDataCell(cell, rowState);
     cell.Controls.Add(textBox);
     CompareValidator vld = new CompareValidator();
     vld.ControlToValidate = textBox.ID;
     vld.ID = textBox.ID + "vld";
     vld.Operator = ValidationCompareOperator.DataTypeCheck;
     vld.ErrorMessage = "не верный формат (2)";
     vld.Text = "! (2)";
     vld.Display = ValidatorDisplay.Dynamic;
     if (GridColumn.Type == typeof(int)) vld.Type = ValidationDataType.Integer;
     if (GridColumn.Type == typeof(decimal)) vld.Type = ValidationDataType.Double;
     if (GridColumn.Type == typeof(string)) vld.Type = ValidationDataType.String;
     cell.Controls.Add(vld);
     if (!GridColumn.AllowNULL)
     {
         RequiredFieldValidator reqvld = new RequiredFieldValidator();
         reqvld.ControlToValidate = textBox.ID;
         reqvld.ID = textBox.ID + "reqvld";
         reqvld.ErrorMessage = "поле не может быть пустым (1)";
         reqvld.Text = "! (1)";
         reqvld.Display = ValidatorDisplay.Dynamic;
         cell.Controls.Add(reqvld);
     }
 }
开发者ID:vahtel65,项目名称:Aspect_loc,代码行数:32,代码来源:TextBoxProductGridField.cs


示例3: FormViewRow

 public FormViewRow(int itemIndex, DataControlRowType rowType, DataControlRowState rowState)
 {
     this._itemIndex = itemIndex;
     this._rowType = rowType;
     this._rowState = rowState;
     this.RenderTemplateContainer = true;
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:7,代码来源:FormViewRow.cs


示例4: InitializeCell

        public override void InitializeCell(DataControlFieldCell cell, DataControlCellType cellType, DataControlRowState rowState, int rowIndex)
        {
            chkBox = new CheckBox {ID = "chkBool", Enabled = false};
            cell.Controls.Add(chkBox);

            base.InitializeCell(cell, cellType, rowState, rowIndex);
        }
开发者ID:erwinbovendeur,项目名称:ADF,代码行数:7,代码来源:Columns.cs


示例5: ExtractValuesFromCell

 public override void ExtractValuesFromCell(IOrderedDictionary dictionary, DataControlFieldCell cell, DataControlRowState rowState, bool includeReadOnly)
 {
     Control control = null;
     string dataField = this.DataField;
     object obj2 = null;
     if (cell.Controls.Count > 0)
     {
         control = cell.Controls[0];
         CheckBox box = control as CheckBox;
         if ((box != null) && (includeReadOnly || box.Enabled))
         {
             obj2 = box.Checked;
         }
     }
     if (obj2 != null)
     {
         if (dictionary.Contains(dataField))
         {
             dictionary[dataField] = obj2;
         }
         else
         {
             dictionary.Add(dataField, obj2);
         }
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:26,代码来源:CheckBoxField.cs


示例6: InitializeControls

        protected override void InitializeControls(DataControlFieldCell cell, DataControlCellType cellType, DataControlRowState rowState, int rowIndex)
        {
            image = new Image();
            image.SetId(ChildId);

            cell.Controls.Add(image);
        }
开发者ID:NLADP,项目名称:ADF,代码行数:7,代码来源:TooltipField.cs


示例7: GridViewTableCell

 /// <summary>
 /// 构造函数
 /// </summary>
 public GridViewTableCell(TableCell tableCell, int columnIndex, DataControlRowType rowType, DataControlRowState rowState)
 {
     this._tableCell = tableCell;
     this._columnIndex = columnIndex;
     this._rowType = rowType;
     this._rowState = rowState;
 }
开发者ID:kiler398,项目名称:baseframeworktemplate,代码行数:10,代码来源:GridViewTableCell.cs


示例8: InitializeCell

 public override void InitializeCell(DataControlFieldCell cell, DataControlCellType cellType, DataControlRowState rowState, int rowIndex)
 {
     base.InitializeCell(cell, cellType, rowState, rowIndex);
     if (cell == null)
     {
         throw new ArgumentNullException("cell");
     }
     ImageButton button3 = new ImageButton {
         ID = "rise",
         ImageUrl = this.RiseUrl,
         CommandName = "Rise"
     };
     ImageButton child = button3;
     ImageButton button4 = new ImageButton {
         ID = "fall",
         ImageUrl = this.FallUrl,
         CommandName = "Fall"
     };
     ImageButton button2 = button4;
     if (cellType == DataControlCellType.DataCell)
     {
         cell.Controls.Add(button2);
         cell.Controls.Add(child);
     }
 }
开发者ID:huaminglee,项目名称:myyyyshop,代码行数:25,代码来源:SortImageColumn.cs


示例9: InitializeCell

        public override void InitializeCell(
            DataControlFieldCell cell,
            DataControlCellType cellType,
            DataControlRowState rowState,
            int rowIndex)
        {
            if (cellType == DataControlCellType.DataCell)
               {
                    var control = new DynamicControl() { DataField = DataField };

                    // Copy various properties into the control
                    control.UIHint = UIHint;
                    control.HtmlEncode = HtmlEncode;
                    control.NullDisplayText = NullDisplayText;

                    // this the default for DynamicControl and has to be
                    // manually changed you do not need this line of code
                    // its there just to remind us what we are doing.
                    control.Mode = DataBoundControlMode.ReadOnly;

                    cell.Controls.Add(control);
               }
               else
               {
                    base.InitializeCell(cell, cellType, rowState, rowIndex);
               }
        }
开发者ID:weavver,项目名称:data,代码行数:27,代码来源:DynamicReadonlyField.cs


示例10: InitializeDataCell

 protected override void InitializeDataCell(DataControlFieldCell cell, DataControlRowState rowState)
 {
     CheckBox child = null;
     CheckBox box2 = null;
     if ((((rowState & DataControlRowState.Edit) != DataControlRowState.Normal) && !this.ReadOnly) || ((rowState & DataControlRowState.Insert) != DataControlRowState.Normal))
     {
         CheckBox box3 = new CheckBox {
             ToolTip = this.HeaderText
         };
         child = box3;
         if ((this.DataField.Length != 0) && ((rowState & DataControlRowState.Edit) != DataControlRowState.Normal))
         {
             box2 = box3;
         }
     }
     else if (this.DataField.Length != 0)
     {
         CheckBox box4 = new CheckBox {
             Text = this.Text,
             Enabled = false
         };
         child = box4;
         box2 = box4;
     }
     if (child != null)
     {
         cell.Controls.Add(child);
     }
     if ((box2 != null) && base.Visible)
     {
         box2.DataBinding += new EventHandler(this.OnDataBindField);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:33,代码来源:CheckBoxField.cs


示例11: InitializeDataCell

 protected override void InitializeDataCell(DataControlFieldCell cell, DataControlRowState rowState)
 {
     DropDownList ddl = new DropDownList();
     ddl.Items.Add("");
     ddl.AppendDataBoundItems = true;
     if (!string.IsNullOrEmpty(this.DataSourceID) || null != this.DataSource)
     {
         if (!string.IsNullOrEmpty(this.DataSourceID))
         {
             ddl.DataSourceID = this.DataSourceID;
         }
         else
         {
             ddl.DataSource = this.DataSource;
         }
         ddl.DataTextField = this.DataTextField;
         ddl.DataValueField = this.DataValueField;
     }
     if (this.DataField.Length != 0)
     {
         ddl.DataBound += new EventHandler(this.OnDataBindField);
     }
     ddl.Enabled = false;
     if ((rowState & DataControlRowState.Edit) != DataControlRowState.Normal || (rowState & DataControlRowState.Insert) != DataControlRowState.Normal)
     {
         ddl.Enabled = true;
     }
     cell.Controls.Add(ddl);
 }
开发者ID:t1b1c,项目名称:lwas,代码行数:29,代码来源:DropDownListField.cs


示例12: GridViewRow

		public GridViewRow (int rowIndex, int dataItemIndex, DataControlRowType rowType, DataControlRowState rowState)
		{
			this.rowIndex = rowIndex;
			this.dataItemIndex = dataItemIndex;
			this.rowType = rowType;
			this.rowState = rowState;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:7,代码来源:GridViewRow.cs


示例13: InitializeControls

        protected override void InitializeControls(DataControlFieldCell cell, DataControlCellType cellType, DataControlRowState rowState, int rowIndex)
        {
            button = new LinkButton { CommandName = CommandName };
            button.SetId(ChildId);

            if (Click != null) button.Click += Click;

            cell.Controls.Add(button);

            tooltipbutton = new LinkButton { CommandName = CommandName, Visible = false};
            tooltipbutton.SetId(ChildId);

            cell.Controls.Add(tooltipbutton);

            if (ShowLabelIfDisabled)
            {
                labelIfDisabled = new Label { Visible = false };

                cell.Controls.Add(labelIfDisabled);

                tooltiplabelIfDisabled = new Label { Visible = false };

                cell.Controls.Add(tooltiplabelIfDisabled);
            }
        }
开发者ID:NLADP,项目名称:ADF,代码行数:25,代码来源:TextButton.cs


示例14: InitializeDataCell

 protected override void InitializeDataCell(DataControlFieldCell cell, DataControlRowState rowState)
 {
     //base.InitializeDataCell(cell, rowState);
     HyperLink link = new HyperLink();
     link.DataBinding += new EventHandler(this.link_DataBinding);
     link.CssClass = "thickbox";
     cell.Controls.Add(link);
 }
开发者ID:vahtel65,项目名称:Aspect_loc,代码行数:8,代码来源:ActionProductGridField.cs


示例15: DetailsViewPagerRow

		public DetailsViewPagerRow (
			int rowIndex,
			DataControlRowType rowType,
			DataControlRowState rowState
		)
			:base (rowIndex, rowType, rowState)
		{
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:8,代码来源:DetailsViewPagerRow.cs


示例16: InitializeDataCell

			protected override void InitializeDataCell (DataControlFieldCell cell, DataControlRowState rowState)
			{
				if ((rowState & DataControlRowState.Edit) != DataControlRowState.Normal) {
					TextBox textBox = new TextBox ();
					cell.Controls.Add (textBox);
					textBox.DataBinding += OnDataBindField;
				} else
					base.InitializeDataCell (cell, rowState);
			}
开发者ID:nobled,项目名称:mono,代码行数:9,代码来源:BoundField_Bug646505.aspx.cs


示例17: ExtractValuesFromCell

		public override void ExtractValuesFromCell(System.Collections.Specialized.IOrderedDictionary dictionary, DataControlFieldCell cell, DataControlRowState rowState, bool includeReadOnly)
		{
			if (rowState == DataControlRowState.Normal)
			{

			}

			base.ExtractValuesFromCell(dictionary, cell, rowState, includeReadOnly);
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:9,代码来源:SubTemplateField.cs


示例18: InitializeControls

        protected override void InitializeControls(DataControlFieldCell cell, DataControlCellType cellType, DataControlRowState rowState, int rowIndex)
        {
            button = new ImageButton { ImageUrl = "", CommandName = CommandName };
            button.SetId(ChildId);

            if (Click != null) button.Click += Click;

            cell.Controls.Add(button);
        }
开发者ID:NLADP,项目名称:ADF,代码行数:9,代码来源:IconButton.cs


示例19: InitializeCell

        public override void InitializeCell(DataControlFieldCell cell, DataControlCellType cellType, DataControlRowState rowState, int rowIndex)
        {
            base.InitializeCell(cell, cellType, rowState, rowIndex);

            // We need to have a header that has a sort expression.
            if (cellType == DataControlCellType.Header && !string.IsNullOrWhiteSpace(this.SortExpression))
            {
                cell.Controls.Add(Common.CreatePinningButton(IsPinned, IsPinnable, this.SortExpression, Toggle_Click));
            }
        }
开发者ID:acasciani,项目名称:Trackr2,代码行数:10,代码来源:ITemplateField.cs


示例20: InitializeDataCell

 protected override void InitializeDataCell(DataControlFieldCell cell, DataControlRowState rowState)
 {
     //base.InitializeDataCell(cell, rowState);
     CheckBox checkBox = new CheckBox();
     checkBox.ID = this.ControlID;
     base.InitializeDataCell(cell, rowState);
     checkBox.EnableViewState = true;
     checkBox.DataBinding += new EventHandler(this.checkBox_DataBinding);
     cell.Controls.Add(checkBox);
 }
开发者ID:vahtel65,项目名称:Aspect_loc,代码行数:10,代码来源:CheckBoxProductGridField.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# DataControlRowType类代码示例发布时间:2022-05-24
下一篇:
C# DataContract类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap