This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi there, When you drag the column divider lines on the column header to resize the column width, it will not take effects (column width will not change) until you click on any part of the column header. Here is how it works: I have an application that has dialog with the data having master-detailed relationship: 1) on a "master" part I have a datagrid that binds to a BindingList that has 2 records 2) On a "detailed" part I have tab control (ActiPro tab control) with 2 tabs, each tab will have a datagrid with binding to the BindingList on it, See screen shots attached for what I mean. 3) When change current record by highlight on a row on the master datagrid, the detailed part datagrid will change to different BindingLists. Try to resize the column width on the detailed part on the current tab, it works. Then, switch to the 2nd tab on detailed part, try to resize the column width, then the column width is not change until you click on any column header. I set up the application to use your source code and try to see if I can figure out what is wrong, but UpdateStarSize() function in class DataGridColumnHeader acting normally, the Column.Width is set properly, but the UI does not change until you click on the column header. Print out debug info before calling the UpdateStarSize() and inside the UpdateStarSize(): "e.HorizontalChange=0.0, h_offset=0.0, newWidth=271.02222222222213" "newWidth=271.02222222222213, column.Width={138.080951033116*} pixelsPerStar=1.9627777777777782" "e.HorizontalChange=-57.0, h_offset=0.0, newWidth=214.02222222222213" "newWidth=214.02222222222213, column.Width={109.040475516558*} pixelsPerStar=1.9627777777777782" "e.HorizontalChange=-106.0, h_offset=0.0, newWidth=165.02222222222213" "newWidth=165.02222222222213, column.Width={84.0758562128502*} pixelsPerStar=1.9627777777777782" "e.HorizontalChange=-147.0, h_offset=0.0, newWidth=124.02222222222213" "newWidth=124.02222222222213, column.Width={63.1870931219926*} pixelsPerStar=1.9627777777777784" "e.HorizontalChange=-156.0, h_offset=0.0, newWidth=115.02222222222213" "newWidth=115.02222222222213, column.Width={58.601754882536*} pixelsPerStar=1.9627777777777784" "e.HorizontalChange=-159.0, h_offset=0.0, newWidth=112.02222222222213" "newWidth=112.02222222222213, column.Width={57.0733088027172*} pixelsPerStar=1.9627777777777784" Look, column width is decreasing but the UI does not show. What else should I look into for helping you to identify the problem? I am using version 6.0, same problem not happening for version 5.0 Thanks, Gordon |
|
|
Hi Jason, Since I cannot tell what is wrong from your code, so I have created re-producing project for the problem. You need to run the application and do the following: 1)Click on last button Grid Column Res 2)Resize the column width by dragging column divider for the "First DataGrid" tab and "2nd DataGrid" tab, the resizing is fine 3) Stay on the "2nd DataGrid" tab, Click on button "Change Content" 4) Resizing the DataGrid Column Width as in step 2), it is working fine. 5) Click on "First DataGrid" Tab, and try to resize the column width as in step2) , the resizing is not working anymore. A lot of page in our application has the same problem as in this sample application, we need to fix it very very soon. Please help us... Thanks, Gordon |
|
|
Hello Gordon Thanks for the repro project and all the information that you gathered. This issue will be resolved in the next nightly build. The issue was that when the DataGrid was being reloaded once the tab was switched, the column headers were being populated before the DataGridPanel class could load and attach the event handlers. The fix was to iterate the columns in the DataGridPanel loaded event and attach the event handlers then. -Jason Fauchelle |
|
|
Hi Jason, The June 25, 2014 nightly build seemed fix the problem. Thanks, Gordon |
|