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


C# BoundColumn.Set_Owner方法代码示例

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


在下文中一共展示了BoundColumn.Set_Owner方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddPropertyToColumns

		void AddPropertyToColumns (PropertyDescriptor prop, bool tothis)
		{
			BoundColumn b = new BoundColumn ();
			b.Set_Owner (this);
			if (IsTrackingViewState) {
				IStateManager m = (IStateManager) b;
				m.TrackViewState ();
			}
			b.HeaderText = prop.Name;
			b.DataField = (tothis ? BoundColumn.thisExpr : prop.Name);
			b.SortExpression = prop.Name;
#if NET_2_0
			if (string.Compare (DataKeyField, b.DataField, StringComparison.InvariantCultureIgnoreCase) == 0) {
				b.ReadOnly = true;
			}
#endif
			DataSourceColumns.Add (b);
		}
开发者ID:runefs,项目名称:Marvin,代码行数:18,代码来源:DataGrid.cs

示例2: LoadViewState

		protected override void LoadViewState (object savedState)
		{
			object [] pieces = savedState as object [];

			if (pieces == null)
				return;

			base.LoadViewState (pieces [0]);
			if (columns != null) {
				IStateManager cm = (IStateManager) columns;
				cm.LoadViewState (pieces [1]);
			}
			if (pieces [2] != null)
				PagerStyle.LoadViewState (pieces [2]);
			if (pieces [3] != null)
				HeaderStyle.LoadViewState (pieces [3]);
			if (pieces [4] != null)
				FooterStyle.LoadViewState (pieces [4]);
			if (pieces [5] != null)
				ItemStyle.LoadViewState (pieces [5]);
			if (pieces [6] != null)
				AlternatingItemStyle.LoadViewState (pieces [6]);
			if (pieces [7] != null)
				SelectedItemStyle.LoadViewState (pieces [7]);
			if (pieces [8] != null)
				EditItemStyle.LoadViewState (pieces [8]);

#if NET_2_0
			if (pieces [9] != null)
				ControlStyle.LoadViewState (pieces [8]);

			if (pieces [10] != null) {
				// IStateManager manager = (IStateManager) DataSourceColumns;
				// manager.LoadViewState (pieces [10]);
				object [] cols = (object []) pieces [10];
				foreach (object o in cols) {
					BoundColumn c = new BoundColumn ();
					((IStateManager) c).TrackViewState ();
					c.Set_Owner (this);
					((IStateManager) c).LoadViewState (o);
					DataSourceColumns.Add (c);
				}
			}
#else
			if (pieces [9] != null) {
				// IStateManager manager = (IStateManager) DataSourceColumns;
				// manager.LoadViewState (pieces [9]);
				object [] cols = (object []) pieces [9];
				foreach (object o in cols) {
					BoundColumn c = new BoundColumn ();
					c.Set_Owner (this);
					((IStateManager) c).LoadViewState (o);
					DataSourceColumns.Add (c);
				}
			}
#endif
		}
开发者ID:runefs,项目名称:Marvin,代码行数:57,代码来源:DataGrid.cs


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