Dev gridcontrol 对数据分组 ;0 1 2显示为 自定义字段

gridView3.Columns["translator"].GroupIndex = 0;
gridView3.ExpandAllGroups();
gridView3.GroupSummary.Add(SummaryItemType.None, "translator", null);

其中translator是按照分组的字段;

-----------------------------------------------------------------------------------------

显示标识位 0 的位置显示:“已完成”:

private voidgridView1_CustomColumnDisplayText(objectsender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgse)  
        {  
            if(e.Column.FieldName =="sex")  
            {  
                switch(e.Value.ToString().Trim())  
                {  
                    case"1":  
                        e.DisplayText = "男";  
                        break;  
                    case"0":  
                        e.DisplayText = "女";  
                        break;  
                    default:  
                        e.DisplayText = "";  
                        break;  
                 }  
             }  
         }

已完结

你可能感兴趣的:(GridView,dev,gridcontrol)