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


C# WebControls.DataGridItem类代码示例

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


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

示例1: DNNDataGridCheckChangedEventArgs

 public DNNDataGridCheckChangedEventArgs( DataGridItem item, bool isChecked, string field, bool isAll ) : base( item )
 {
     this.mIsAll = false;
     this.mChecked = isChecked;
     this.mIsAll = isAll;
     this.mField = field;
 }
开发者ID:huayang912,项目名称:cs-dotnetnuke,代码行数:7,代码来源:DNNDataGridCheckChangedEventArgs.cs

示例2: Insert

        private void Insert(DataGridItem e)
        {
            try
            {
                TextBox txtName = e.FindControl("txtName") as TextBox;
                TextBox txtAddress = e.FindControl("txtAddress") as TextBox;
                DropDownList ddlType = e.FindControl("ddlType") as DropDownList;

                List<SqlParameter> pars = new List<SqlParameter>();
                pars.Add(new SqlParameter("@Name", txtName.Text));
                pars.Add(new SqlParameter("@Address", txtAddress.Text));
                pars.Add(new SqlParameter("@Type", ddlType.SelectedValue));
                DBHelper.ExecuteNonQuery("sp_Support_AddNew", pars);

                Notify.ShowAdminMessageSuccess("Thêm mới thành công", this.Page);
                dtgSupport.CurrentPageIndex = 0;
                LoadGrid();
            }
            catch
            {
                Notify.ShowAdminMessageError("Lỗi", this.Page);
                LoadGrid();
                return;
            }
        }
开发者ID:rainie1392,项目名称:tamviet-huan,代码行数:25,代码来源:Support.aspx.cs

示例3: Copy

		public void Copy () {
			DataGridItemCollection	c;
			ArrayList		list;
			DataGridItem[]		copy;
			DataGridItem		item;

			list = new ArrayList();
			item = new DataGridItem(0, 0, ListItemType.Item);
			list.Add(item);
			item = new DataGridItem(1, 1, ListItemType.Header);
			list.Add(item);
			item = new DataGridItem(2, 2, ListItemType.Footer);
			list.Add(item);

			c = new DataGridItemCollection(list);

			copy = new DataGridItem[3];
			Assert.AreEqual(3, c.Count, "C1");
			c.CopyTo(copy, 0);
			Assert.AreEqual(3, copy.Length, "C2");

			copy = new DataGridItem[4];
			c.CopyTo(copy, 1);
			Assert.AreEqual(4, copy.Length, "C3");
		}
开发者ID:nobled,项目名称:mono,代码行数:25,代码来源:DataGridItemCollectionTest.cs

示例4: CodeToText

 public static string CodeToText(DataGridItem GridItem, string ColumnName, string TextCol)
 {
     if ((GridItem.DataItem is DataRowView))
         return CodeToText((DataRowView)GridItem.DataItem, ColumnName, TextCol, false);
     if ((GridItem.DataItem is DataRow))
         return CodeToText((DataRow)GridItem.DataItem, ColumnName, TextCol, false);
     return "";
 }
开发者ID:bmanojlovic,项目名称:bforce8583,代码行数:8,代码来源:Utilities.cs

示例5: GetPQUsage

 protected string GetPQUsage(DataGridItem	Container)
 {
     MultiXTpmDB.GroupStatusRow	Row	=	(MultiXTpmDB.GroupStatusRow)((DataRowView)Container.DataItem).Row;
     if(Row.MaxProcessQueueEntries	>	0)
         return	((int)((Row.OutQueueSize	*	100)	/	Row.MaxProcessQueueEntries)).ToString()	+	"%";
     else
         return	"0%";
 }
开发者ID:bmanojlovic,项目名称:bforce8583,代码行数:8,代码来源:GroupsStatus.aspx.cs

示例6: GetOpenModeText

 protected string GetOpenModeText(DataGridItem	Container)
 {
     string SSL = "";
     MultiXTpmDB.LinkRow	Row	=	(MultiXTpmDB.LinkRow)((DataRowView)Container.DataItem).Row;
     if (Row.SSLAPI == MultiXTpm.SSL_API.OpenSSL.ToString())
         SSL = "/" + Row.SSLAPI;
     if(Row.OpenMode	==	(int)MultiXTpm.MultiXOpenMode.MultiXOpenModeClient)
         return	"Client/Connect"	+	SSL;
     if(Row.OpenMode	==	(int)MultiXTpm.MultiXOpenMode.MultiXOpenModeServer)
         return	"Server/Listen"	+	SSL;
     return	"UnKnown";
 }
开发者ID:bmanojlovic,项目名称:bforce8583,代码行数:12,代码来源:LinksList.aspx.cs

示例7: GetPortText

 protected string GetPortText(DataGridItem	Container)
 {
     MultiXTpmDB.LinkRow	Row	=	(MultiXTpmDB.LinkRow)((DataRowView)Container.DataItem).Row;
     if(Row.OpenMode	==	(int)MultiXTpm.MultiXOpenMode.MultiXOpenModeClient)
     {
         return	Row.IsRemotePortNull()	||	Row.RemotePort.Trim().Length	==	0	?	"Unknown" : Row.RemotePort;
     }
     if(Row.OpenMode	==	(int)MultiXTpm.MultiXOpenMode.MultiXOpenModeServer)
     {
         return	Row.IsLocalPortNull()	||	Row.LocalPort.Trim().Length	==	0	?	"Automatic" : Row.LocalPort;
     }
     return	"Unknown";
 }
开发者ID:bmanojlovic,项目名称:bforce8583,代码行数:13,代码来源:LinksList.aspx.cs

示例8: created

 public void created(object sender ,DataGridItemEventArgs  e)
 {
     if(e.Item.ItemType == ListItemType.Footer &&  grid.Items.Count==0)
     {
         Control /*DataGridTable*/ table = grid.Controls[0];
         DataGridItem  tr = new DataGridItem(0,0,ListItemType.Item);
         TableCell  td = new TableCell();
         td.ColumnSpan = table.Controls[0].Controls.Count;//no of cols on header
         td.Text = "No records";
         td.HorizontalAlign = HorizontalAlign.Center;
         tr.Controls.Add(td);
         table.Controls.Add(tr);//controls[0]=table
     }
 }
开发者ID:rags,项目名称:playground,代码行数:14,代码来源:frmGridHeader.aspx.cs

示例9: GetProcessStatusText

        protected string GetProcessStatusText(DataGridItem	Container)
        {
            MultiXTpmDB.ProcessStatusRow	Row;
            if(Container.DataItem	is	DataRowView)
                Row	=	(MultiXTpmDB.ProcessStatusRow)((DataRowView)Container.DataItem).Row;
            else
                Row	=	(MultiXTpmDB.ProcessStatusRow)Container.DataItem;

            if(Row.IsReady)
            {
                if(Row.ControlStatus	==	(int)MultiXTpm.ProcessControlStatus.Normal)
                    return	"Running";
                return	"Running ("	+	((MultiXTpm.ProcessControlStatus)Row.ControlStatus).ToString("g") + ")";
            }
            return	"Stopped ("	+	((MultiXTpm.ProcessControlStatus)Row.ControlStatus).ToString("g") + ")";
        }
开发者ID:bmanojlovic,项目名称:bforce8583,代码行数:16,代码来源:ProcessesStatus.aspx.cs

示例10: Defaults

		public void Defaults ()
		{
			DataGridItem	i;
			string		s;

			i = new DataGridItem(123, 456, ListItemType.Pager);
			s = "blah";

			i.DataItem = s;

			Assert.AreEqual(ListItemType.Pager, i.ItemType, "D1");
			Assert.AreEqual(456, i.DataSetIndex, "D2");
			Assert.AreEqual(123, i.ItemIndex, "D3");
			Assert.AreEqual(s, i.DataItem, "D4");
			Assert.AreEqual("blah", i.DataItem, "D5");
		}
开发者ID:nobled,项目名称:mono,代码行数:16,代码来源:DataGridItemTest.cs

示例11: Delete

 private void Delete(DataGridItem e)
 {
     try
     {
         string id = (e.FindControl("lblId") as Label).Text;
         List<SqlParameter> pars = new List<SqlParameter>();
         pars.Add(new SqlParameter("@Id", id));
         DBHelper.ExecuteNonQuery("sp_Video_Delete", pars);
         Notify.ShowAdminMessageSuccess("Đã xóa", this.Page);
         dtgVideo.CurrentPageIndex = 0;
         LoadGrid();
         Response.Redirect("VideoManager.aspx");
     }
     catch
     {
         Response.Redirect("VideoManager.aspx");
     }
 }
开发者ID:rainie1392,项目名称:tamviet-huan,代码行数:18,代码来源:VideoManager.aspx.cs

示例12: Defaults

		public void Defaults ()
		{
			DataGridItemCollection	c;
			ArrayList		list;
			DataGridItem		item;

			list = new ArrayList();
			item = new DataGridItem(0, 0, ListItemType.Item);
			list.Add(item);
			c = new DataGridItemCollection(list);

			Assert.AreEqual(1, c.Count, "D1");
			Assert.AreEqual(item, c[0], "D2");

			// Copy or ref?
			item = new DataGridItem(1, 1, ListItemType.Header);
			list.Add(item);
			Assert.AreEqual(2, c.Count, "D3");
			Assert.AreEqual(ListItemType.Header, c[1].ItemType, "D4");
		}
开发者ID:nobled,项目名称:mono,代码行数:20,代码来源:DataGridItemCollectionTest.cs

示例13: GetControlFromDataGrid

 public static Control GetControlFromDataGrid(DataGridItem row, Type type, int cellindex, int controlindex)
 {
     if (row.ItemType == ListItemType.Item || row.ItemType == ListItemType.AlternatingItem)
     {
         for (int i = 0; i < row.Cells[cellindex].Controls.Count; i++)
         {
             if(type.Equals(row.Cells[cellindex].Controls[i].GetType()))
             {
                 if (0 == controlindex)
                 {
                     return row.Cells[cellindex].Controls[i];
                 }
                 else
                 {
                     controlindex--;
                 }
             }
         }
     }
     return null;
 }
开发者ID:BackupTheBerlios,项目名称:questioncatalog-svn,代码行数:21,代码来源:DataGridAccess.cs

示例14: Insert

        private void Insert(DataGridItem e)
        {
            try
            {
                string url = (e.FindControl("txtUrl") as TextBox).Text;
                string detail = (e.FindControl("txtDetail") as TextBox).Text;

                List<SqlParameter> pars = new List<SqlParameter>();
                pars.Add(new SqlParameter("@Url", url));
                pars.Add(new SqlParameter("@Detail", detail));
                DBHelper.ExecuteNonQuery("sp_Video_AddNew", pars);

                Notify.ShowAdminMessageSuccess("Thêm mới thành công", this.Page);
                dtgVideo.CurrentPageIndex = 0;
                LoadGrid();
            }
            catch
            {
                Notify.ShowAdminMessageError("Lỗi", this.Page);
                LoadGrid();
                return;
            }
        }
开发者ID:rainie1392,项目名称:tamviet-huan,代码行数:23,代码来源:VideoManager.aspx.cs

示例15: ClearColumn

		protected void ClearColumn(DataGridItem item)
		{
			((DropDownList) item.FindControl("ddlFunction")).SelectedValue = "-1";
			((TextBox) item.FindControl("txtExpression")).Text = "";
			((RadioButtonList) item.FindControl("rblActive")).SelectedValue = "1";
			CalendarPopup dtExpression = (CalendarPopup) item.FindControl("dtExpression");
			dtExpression.SelectedDate = dtExpression.LowerBoundDate;
			CalendarPopup dtTo = (CalendarPopup) item.FindControl("dtTo");
			dtTo.SelectedDate = dtTo.LowerBoundDate;
			CalendarPopup dtFrom = (CalendarPopup) item.FindControl("dtFrom");
			dtFrom.SelectedDate = dtFrom.LowerBoundDate;
			((TextBox) item.FindControl("txtFrom")).Text = "";
			((TextBox) item.FindControl("txtTo")).Text = "";
			((CheckBox) item.FindControl("chkColumnSort")).Checked = false;
			((DropDownList) item.FindControl("ddlColumnSortDirection")).SelectedValue = "asc";
		}
开发者ID:alexan1,项目名称:marketweb,代码行数:16,代码来源:EditTransfers.aspx.cs


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