Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
sanjay kadam
|
Jun 4, 2007 - 2:56 AM
|
i want to give best fit to the name of the Columns of the REPORTGRID..
how can i do this???
|
|
Technical Support
|
Jun 5, 2007 - 9:26 AM
|
You can do this using the CExtGridWnd::BestFitColumn() method.
The CExtGridWnd::BestFitColumn() method uses plain column indices to resize the column. But the CExtReportGridWnd control uses the CExtReportGridColumn* pointers as unique column identifiers. Besides columns can be active(visible) and inactive(invisible). So first of all, you should find the report column in the report grid’s header area. The CExtGridWnd::ColumnCountGet() method returns the number of active(visible) columns for the report grid window. You should get a pointer to each active(visible) header column using the CExtGridWnd::GridCellGetOuterAtTop() method and querying the range of columns from zero to CExtGridWnd::ColumnCountGet()-1 . The returned CExtGridCell* pointers are really the CExtReportGridColumn* pointers. So, you can find the index of the report column and invoke the CExtGridWnd::BestFitColumn() method for it.
|
|