Print Page | Close Window

Column sizing

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=16810
Printed Date: 29 September 2024 at 7:29am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Column sizing
Posted By: schwinn
Subject: Column sizing
Date Posted: 09 June 2010 at 10:35am
Hi
 
Really struggling here and dont know what I'm doing wrong. My report column is not setting the correct size. Let me explain...
 
We have 2 related views in an application. We make changes in one view and it affects the other view, the results view. The results view is my report control, consisting of 39 columns of selectable results. By default we only have 6 selected. We dont want last column expanded, we want each column to be best fit or if the user has manually resized the column then that column stays that width.
 
The results view has on activate code that;
1. ResetContent
2. Put the rows of data into all the columns.
3. Populate.
4. I then iterate each column each column and do GetReportHeader()->BestFit(pCol), unless the column has been manually sized.
 
 
My Problem.
1. Make changes in the first view, lets say make a text string long.
2. Switch to the results view.
3. Select the column to make visible (the column that has a long text string)
4. Problem...the column is now wide enough for the data, it shows ... on the string.
5. I switch back to the other view and switch back again to the results view and the column is now wide enough, the ... has gone.
 
 
Can anyone tell me why this happening, why im getting the .... I want it to be the correct width to start with
 
Thanks for any help
 



Replies:
Posted By: schwinn
Date Posted: 11 June 2010 at 8:24am
Solved the problem by forcing a repaint
 
m_wndReport.SendMessage(WM_PAINT, 0, 0);
 
Believe the problem to be something to do with m_nMaxItemWidth


Posted By: Michl
Date Posted: 29 July 2010 at 7:45am
I think it is more nice to call
m_wndReport.RedrawControl();



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net