I am facing trouble in RadGridView's width which gets increased when I add dynamic columns and their column group headers as per business requirement and at run time only I am removing dynamically added columns and column group headers but the width of the RadGridView never decreased and it does not look good of having grid without any columns on right hand side with horizantol scroll bar.
I hope someone will support me on this trouble.
Thanks
Laxman
6 Answers, 1 is accepted
I have tested controlling the visibility of the columns using the IsVisible property for the column and the width for the GridView was recalculated fine. Do you add/remove the columns or do you just show/hide them in the GridView? Have you tested this with the latest version?
Didie
the Telerik team
Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

I am adding columns and Column Groups dynamically (at run time) and removing dynamic Columns and column groups at run time as well. So once I remove dynamic columns and column groups it does not decrease RadGridView width accordingly which I set Auto in .xaml file and Grid column which is parent contaier for Rad grid view also has width="Auto".
Please help me to solve this issue.
Thanks
Laxman.
I was not able to reproduce the issue. Please find attached my test project for a reference. May I ask you to change it to show your case?
All the best,Didie
the Telerik team
Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

I am not only adding dynamic columms but Column Groups as well and removing dynamic columns and columns group as run time as per business requirement. After my R & D I found that once I removed dynamic columns and column groups I must use call UpdateLayout() method of the grid. like following.
this.rgvGrid.ColumnGroups.RemoveAt(count);
this.rgvGrid.Columns.RemoveAt(count);
this.rgvGrid.UpdateLayout();
the last line solves the issue.
thanks
Laxman

I'm Creating ColumnGroup and Bind the details firsttime.after that the button click cause invalid column name. Anyone can help me?
(Column Group Created in Page_Init)
Hi Ahmed,
I have checked the provided stack trace, and it seems that you are using a web component. This forum is related to UI for WPF. May I ask you to share which Grid component are you using so that I can transfer your question to the correct team.
Regards,
Dinko
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.