3 Answers, 1 is accepted
0
Hi Vasily,
Thank you for contacting us.
Currently this is not possible, however, this is an interesting suggestion. Could you please describe in more detail the situation that requires such behavior and we will consider it when planning our future versions.
Regards,
Jack
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Thank you for contacting us.
Currently this is not possible, however, this is an interesting suggestion. Could you please describe in more detail the situation that requires such behavior and we will consider it when planning our future versions.
Regards,
Jack
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0

vzaytzev
Top achievements
Rank 1
answered on 17 Mar 2010, 05:17 PM
Thank you for your answer!
I have two-level grid, child grid has exactly same columns as parent grid. Columns should have same size, same order and same alignment. I've solved this by handling ColumnWidthChanged event. But parent and child grids sroll independenlty, that was a problem. I solved it by scrolling whole grid in Panel control, not rows in grid.
Also, what is the correct way to calculate grid's actual width? I'm not sure that summarizing columns' width is correct.
And which event fires when all rows finished calculating their width?
I have two-level grid, child grid has exactly same columns as parent grid. Columns should have same size, same order and same alignment. I've solved this by handling ColumnWidthChanged event. But parent and child grids sroll independenlty, that was a problem. I solved it by scrolling whole grid in Panel control, not rows in grid.
Also, what is the correct way to calculate grid's actual width? I'm not sure that summarizing columns' width is correct.
And which event fires when all rows finished calculating their width?
0
Hello vzaytzev,
Jack
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
If I understand correctly, you are describing a self-referencing hierarchy. We plan to add support for this hierarchy mode in our next release - Q2 2010. Find more detail in this blog article.
RadGridView calculates the column width in several cases, for example when column pinned state has changed, or when column width is changed. To calculate the desired width you can use the following code:
int
width = 0;
foreach
(GridViewColumn column
in
this
.radGridView1.ViewDefinition.RenderColumns)
{
width +=
this
.radGridView1.ViewDefinition.GetColumnWidth(column);
width += ((GridTableElement)
this
.radGridView1.GridElement).CellSpacing;
}
if
(
this
.radGridView1.GridElement.VScrollBar.Visibility == ElementVisibility.Visible)
{
width +=
this
.radGridView1.GridElement.VScrollBar.Size.Width;
}
You need to extend this logic to support child views. I hope this helps.
Regards,Jack
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.