Hi,
I have implemented the solution which is recommended by you as follows:
Override CExtReportGridWnd::ReportColumnAdjustTextAlignmentH() function.
ReportColumnAdjustTextAlignmentH()
{
//Get the style of the Cell or Columns (as per requirement)
align = GetStyle();
CExtReportGridWnd::ReportColumnAdjustTextAlignmentH(pRGC, align, RedrawFlag);
//Then update the Header alignment
CExtGridCell *Cell = GridCellGetOuterAtTop(ColNum, RowNum, RUNTIME_CLASS( CExtGridCellHeader ));
Cell->ModifyStyle(__EGCS_TA_***);
}
This algorithms is working fine and changing the header alignment as per ModifyStyle() and cell alignment as per alignment variable (“align” in above code). But I observed some issues
Issue 1: When right click on header->Alignment, it always shows selected alignment type is “Center” doesn’t matter whether cells are left/right aligned. I want alignment option as per cells’ aliment bases instead of columns. So any solution for this?
Issue 2: Changed alignment (say left or right) and reopen the application. Gird resets the last saved alignment style to default.
I observed that GetStyle (in above algo) is returning a junk value. I also tried to used GetStyleEx() function but it is always retuning 0.
So can you please tell me how can I get the correct style value or how I can I restore last saved alignment style.
Thanks in advance.