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


C# GridView.GetRowCellDisplayText方法代码示例

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


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

示例1: SetCellDisable

        public static void SetCellDisable(GridView view, string FieldName, string KeyField, long[] KeyValues)
        {
            view.CustomDrawCell += delegate(object sender, RowCellCustomDrawEventArgs e)
            {
                if (e.RowHandle == view.FocusedRowHandle) return;

                if (e.Column.FieldName == FieldName)
                {
                    for (int vt = 0; vt <= KeyValues.Length - 1; vt++)
                    {
                        if (Convert.ToInt64(view.GetRowCellDisplayText(e.RowHandle, KeyField)) == KeyValues[vt])
                        {
                            e.Appearance.BackColor = Color.Gray;
                        }
                    }
                }
            };
            view.ShowingEditor += delegate(object sender, CancelEventArgs e)
            {
                int index = view.FocusedRowHandle;
                if (index >= 0)
                {
                    for (int vt = 0; vt <= KeyValues.Length - 1; vt++)
                    {
                        if (Convert.ToInt64(view.GetRowCellDisplayText(index, KeyField)) == KeyValues[vt]
                            && view.FocusedColumn.FieldName == FieldName)
                        {
                            e.Cancel = true;
                        }
                    }
                }
            };
        }
开发者ID:khanhdtn,项目名称:my-office-manager,代码行数:33,代码来源:HelpGridExt.cs

示例2: DrawBackground

		public static void DrawBackground(RowObjectCustomDrawEventArgs e, GridView view)
		{
			var painter = e.Painter as GridGroupRowPainter;
			var info = e.Info as GridGroupRowInfo;
			int level = view.GetRowLevel(e.RowHandle);
			int row = view.GetDataRowHandleByGroupRowHandle(e.RowHandle);
			info.GroupText = string.Format("{0}: {1}", view.GroupedColumns[level].Caption,
				view.GetRowCellDisplayText(row, view.GroupedColumns[level]));
			e.Appearance.DrawBackground(e.Cache, info.Bounds);
			painter.ElementsPainter.GroupRow.DrawObject(info);
		}
开发者ID:w01f,项目名称:VolgaTeam.SalesLibrary,代码行数:11,代码来源:GroupSummaryHelper.cs

示例3: GetStringWithTest

 private string GetStringWithTest(GridView AView, string FieldName)
 {
     try
     {
         string val = "";
         int rowHandle = GetGridViewFocusedRowHandle(AView);
         if (AView.GetRowCellDisplayText(rowHandle, FieldName).ToString().Length > 0)
             val = AView.GetRowCellDisplayText(rowHandle, FieldName).ToString();
         return val;
     }
     catch (Exception ex)
     {
         throw new Exception("An error occurred while attempting to read grid: " + AView.Name + ", field: " + FieldName + "." + Environment.NewLine +
              "Error CNF-126 in " + FORM_NAME + ".GetStringWithTest(): " + ex.Message);
     }
 }
开发者ID:Amphora2015,项目名称:DemoTest,代码行数:16,代码来源:frmMain.cs

示例4: GetCellHintText

		private string GetCellHintText(GridView view, int rowHandle, DevExpress.XtraGrid.Columns.GridColumn column) 
		{
			string ret = view.GetRowCellDisplayText(rowHandle, column);
			bool result = Regex.Match(ret, ((MessageModel)ColumnValidator[column.Name]).Expression, RegexOptions.IgnoreCase).Success;
			if (!result)
			{
				return ((MessageModel)ColumnValidator[column.Name]).Message;
			}
			else
			{
				return ret + " 是有效的数据";
			}
		}
开发者ID:zesus19,项目名称:c4.v2.T,代码行数:13,代码来源:Finan2Details.cs

示例5: GetCellHintText

        private string GetCellHintText(GridView view, int rowHandle, GridColumn column)
        {
            string ret = "<b>双击进行默认充值!</b> \r\n";
            foreach (DevExpress.XtraGrid.Columns.GridColumn col in view.Columns)
            {
                if (!col.FieldName.Equals("Member_ID"))
                {
                    ret += string.Format("{0}: {1} \r\n", col.GetTextCaption(), view.GetRowCellDisplayText(rowHandle, col));
                }

            }
            return ret;
        }
开发者ID:riveryong,项目名称:shopsoft,代码行数:13,代码来源:Form06_MemberRecharge.cs


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