First of all you have to set gcProjectNo.GroupIndex = 0;
Then you have to handle the CustomDrawGroupRow event.
private void grdvProjectList_CustomDrawGroupRow(object sender, DevExpress.XtraGrid.Views.Base.RowObjectCustomDraw EventArgs e)
{
GridView view = sender as GridView;
DevExpress.XtraGrid.Views.Grid.ViewInfo.GridGroupR owInfo info =
e.Info as DevExpress.XtraGrid.Views.Grid.ViewInfo.GridGroupR owInfo;
int handle = view.GetDataRowHandleByGroupRowHandle(e.RowHandle) ;
if (info.Column.FieldName == "PRJ_NO")
{
StringBuilder oGroupText = new StringBuilder();
oGroupText.Append(view.GetRowCellValue(handle, "PRJ_NO").ToString());
oGroupText.Append(" - ");
oGroupText.Append(view.GetRowCellValue(handle, "PRJ_NAME").ToString());
info.GroupText = oGroupText.ToString();
}
}
Hope this would be useful.Any
suggestions are welcomed.