/// <summary> /// 格式化数据显示 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void treeListLookUpEdit1TreeList_GetNodeDisplayValue(object sender, DevExpress.XtraTreeList.GetNodeDisplayValueEventArgs e) { var dep = this.treeListLookUpEdit1TreeList.GetDataRecordByNode(e.Node) as DepartmentInfo; if (e.Column.FieldName == "Type") { e.Value = ((DepartmentType)dep.Type).DisplayName(); } }
private void treeList1_GetNodeDisplayValue(object sender, DevExpress.XtraTreeList.GetNodeDisplayValueEventArgs e) { if (e.Column.FieldName == "XMMC") { if (e.Value != null) { e.Value = e.Value.ToString().Split('【')[0]; } } }
private void TreeListDataFilter_GetNodeDisplayValue(object sender, DevExpress.XtraTreeList.GetNodeDisplayValueEventArgs e) { var dataFilterInfo = GetCurrentData(); if (dataFilterInfo != null && dataFilterInfo.DataFilter is CompositeLogicFilter) { if (e.Column != ColumnName) { e.Value = null; } } }
/// <summary> /// 格式化数据显示 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tlView_GetNodeDisplayValue(object sender, DevExpress.XtraTreeList.GetNodeDisplayValueEventArgs e) { var dep = this.tlView.GetDataRecordByNode(e.Node) as DepartmentInfo; if (e.Column.FieldName == "Type") { e.Value = ((DepartmentType)dep.Type).DisplayName(); } else if (e.Column.FieldName == "Enabled") { e.Value = Convert.ToInt32(e.Value) == 0 ? "未启用" : "已启用"; } }
private void treeList1_GetNodeDisplayValue(object sender, DevExpress.XtraTreeList.GetNodeDisplayValueEventArgs e) { if (e.Node != null) { if (e.Node.Level >= 3) { e.Node.Visible = false; // foreach (DevExpress.XtraTreeList.Nodes.TreeListNode item in e.Node.Nodes) //{ // item.Visible = false; //} } } }
/// <summary> /// 格式化数据显示 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tlMenu_GetNodeDisplayValue(object sender, DevExpress.XtraTreeList.GetNodeDisplayValueEventArgs e) { var entity = this.tlMenu.GetDataRecordByNode(e.Node) as Menu; if (entity == null) { return; } if (e.Column.FieldName == "Type") { e.Value = ((MenuType)entity.Type).DisplayName(); } }
/// <summary> /// 格式化数据显示 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tlView_GetNodeDisplayValue(object sender, DevExpress.XtraTreeList.GetNodeDisplayValueEventArgs e) { var entity = this.tlView.GetDataRecordByNode(e.Node) as Privilege; if (entity == null) { return; } if (e.Column.FieldName == "Action") { string dis = ""; if ((entity.Action & (int)DataAction.Create) != 0) { dis += "Create|"; } if ((entity.Action & (int)DataAction.Read) != 0) { dis += "Read|"; } if ((entity.Action & (int)DataAction.Update) != 0) { dis += "Update|"; } if ((entity.Action & (int)DataAction.Delete) != 0) { dis += "Delete|"; } if (dis.Length > 0) { e.Value = dis.Substring(0, dis.Length - 1); } else { e.Value = ""; } } }
private void treeList1_GetNodeDisplayValue(object sender, DevExpress.XtraTreeList.GetNodeDisplayValueEventArgs e) { }
private void treeList1_GetNodeDisplayValue(object sender, DevExpress.XtraTreeList.GetNodeDisplayValueEventArgs e) { e.Node.Tag = this.treeList1.GetDataRecordByNode(e.Node); }