Hi,
With this sample: Windows\Grid.Grouping.Windows\Samples\2.0\Appearance\FrozenColumns\vb
If I remove the: TrackWidthOfParentColumn
I get a weird behavior. Is it possible to have different frozen column on the parent and child? Also the frozen of both levels won't end at the same column.
RC
Rajadurai C
Syncfusion Team
April 27, 2009 07:04 AM UTC
Hi Stephane,
Thanks for your interest in Syncfusion products.
I apologize for the delay in responding.
While scrolling with frozen columns in a grid with flat table, normal behavior occurs. But with nested table, if there is a frozen column in parentgrid, on scrolling, repaint issues occur in nested table. To avoid this, TrackWidthOfParentColumn property is used.
The scrolling is handled based on the parent table in grid by default. Hence, column in nested table must be aligned with column in parent table in corresponding column index to avoid scrolling exception.
Hence it cannot be made to scroll the grid based on nested table as it might lead to some other related issues.
Regards,
Rajadurai
S_
Stephane _
April 27, 2009 07:38 PM UTC
Thanks for the info!
S_
Stephane _
April 28, 2009 08:06 PM UTC
In the same sample. In GetParentTable(), if I change the number of col from 9 to 30. I get a weird behavior where I can see the child column twice and when I click on it, the frozen columns get drawn over by unfrozen column.
Do you know how this can be fixed?
ggc_double_6446d037.zip
RC
Rajadurai C
Syncfusion Team
April 29, 2009 02:25 PM UTC
Hi Stephane,
I was able to observe the issue. It is due to the thing that the frozen property of column in child table resets when there is no more columns to be scrolled in child table and more columns to be scrolled in parent table. When all the columns in child table scrolled off, the frozen property resets and default position of all the columns(when there is no frozen column in child table) at that scroll position is repainted. It leads to the weird appearance in grid. It is by default. However, this weird appearance can be avoided by handling the following code in TableControlHScrollPixelPosChanged event.
this.gridGroupingControl1.TableControlHScrollPixelPosChanged += new GridTableControlScrollPositionChangedEventHandler(gridGroupingControl1_TableControlHScrollPixelPosChanged);
//Event
void gridGroupingControl1_TableControlHScrollPixelPosChanged(object sender, GridTableControlScrollPositionChangedEventArgs e)
{
GridTableControl tc = e.TableControl as GridTableControl;
tc.Refresh();
}
Regards,
Rajadurai
S_
Stephane _
April 29, 2009 05:05 PM UTC
It does not seem to fix the problem.
When I add this code, I can see what is happening. When I scroll pass child Col9, the frozen column move to the left.
RC
Rajadurai C
Syncfusion Team
April 30, 2009 01:16 PM UTC
Hi Stephane,
To avoid such repainting issues in grid, only way is, setting of frozen columns only to main table and not to nested child table. The way the drawing of the nested tables is implemented is that they are hard-coded not to scroll at all. They get displayed as a view to the nested table based on the scroll position of the main table.
Let me know if you have any further concerns.
Regards,
Rajadurai
S_
Stephane _
May 1, 2009 08:33 PM UTC
Thanks for the info.
I added an empty column at the end of the child table. This column is resized making sure both the child and parent table are the same length.
RC
Rajadurai C
Syncfusion Team
May 4, 2009 02:06 PM UTC
Hi Stephane,
Thanks for your update. Glad to hear that your issue has been solved.
Regards,
Rajadurai