I am facing problem with ColumnHeader . It blows when I drag any column to increase its size. This is happening when my grid has 195 columns, column width=200px and any numbers of rows.
I want to know whether there is any restriction with no.of column and column width size?
I have attached Before and After Screen shot.
9 Answers, 1 is accepted
Please find my screen shots in below link. (Attach files is not working here getting error)
https://drive.google.com/open?id=0BwTjd8OR-J2OQjNidmFXSDQyNlk
Generally, there is no limitation in the number of columns defined for the RadGridView control. You can disable the possibility of column resizing by setting the CanUserResizeColumns property of RadGridView to False. Would this work for you?
Regards,
Stefan Nenchev
Telerik by Progress
We don't want to restrict Column resize feature. It is already existing functionality we added few more new columns from then this problem is coming.
You can simulate this problem by simply creating grid with data with 25 rows * 200 columns and column width size to 200px.
I managed to reproduce the behavior, however, it is caused due to a limitation in the Silverlight framework and its element measuring mechanism so there is not a convenient workaround that I can suggest. As you might have noticed, moving the scrollbar would cause the RadGridView to redraw correctly, so you can apply the following change in the ColumnWidthChanged event:
private
void
clubsGrid_ColumnWidthChanged(
object
sender, ColumnWidthChangedEventArgs e)
{
var scrollbar = clubsGrid.ChildrenOfType<GridViewScrollViewer>().Where(x => x.Name==
"PART_ItemsScrollViewer"
).FirstOrDefault();
if
(scrollbar !=
null
)
{
scrollbar.ScrollToHorizontalOffset(scrollbar.HorizontalOffset + 1);
}
}
This will cause the scrollbar to move slightly and limit the glitch to be visible only while your users hold the column splitter.
Regards,
Stefan Nenchev
Telerik by Progress
Hello Stefan Nenchev,
Your given changes will work. But we have problem while Grouping . When we add columns for grouping, header and rows will blow. In the end everything will left white.
Indeed, grouping would be problematic. Unfortunately, this is a limitation in the Silverlight Framework so you will have to come up with some workaround. You can disable the grouping of the RadGridView or consider splitting the content into two separate controls. I am not familiar with the context of your application but there definitely should be something you can do. For example, you can group the columns according to some viable criteria and present some UI for your users to choose which category to see. This way they can switch the different view of columns.
Regards,
Stefan Nenchev
Telerik by Progress