本文整理汇总了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;
}
}
}
};
}
示例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);
}
示例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);
}
}
示例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 + " 是有效的数据";
}
}
示例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;
}