using DevExpress.Utils;
using DevExpress.XtraGrid.Views.Grid;
using System.Drawing;
private void gvMain_CustomDrawFooterCell(object sender, FooterCellCustomDrawEventArgs e)
{
if (GridData == null)
{
return;
}
if (e.Column == colRepQtyName)
{
e.Info.DisplayText = _projectCumulativePlan;
e.Info.Bounds = new Rectangle(e.Bounds.X, e.Bounds.Y, this.bandMain.Width, e.Bounds.Height);
e.Info.Appearance.Options.UseTextOptions = true;
e.Info.Appearance.TextOptions.HAlignment = HorzAlignment.Center;
e.Painter.DrawObject(e.Info);
e.Handled = true;
}
else
{
string fieldName = e.Column.FieldName;
if (fieldName.StartsWith(CpjUtil.C_MonthColumnFieldNamePrefix))
{
string value = string.Format(e.Column.SummaryItem.DisplayFormat
, _sortedValueWithAccum[fieldName.Split('_')[1].CPJToDateTime()].AccumValue);
e.Info.DisplayText = value;
e.Painter.DrawObject(e.Info);
e.Handled = true;
}
}
}
DevExpress XtraGrid 의 RepositoryItemCheckEdit 컬럼의 헤더에 전체선택(해제)기능 넣기
여기에서 체크박스가 표시되는 Column 의 FieldName 은 “Select”로 함 1. RepositoryItemCheckEdit 를 전역변수로 선언 // CheckBox 로 표시될 ColumnEdit RepositoryItemCheckEdit _repChkYN = new RepositoryItemCheckEdit(); // 전체선택 체크박스 상태 private bool _stateAllSel = false; 2. ColumnEdit 기본설정...
0 Comments