The problem is that the RadGridView controls all end up being different widths. We can't manually specify column widths since they have to work with whatever the data is. I've attached a screen shot of the issue. (Apologies for the ugly redactions.)
Is there a way to somehow link the RadGridViews together (and it has to be in code behind not in the XAML) so they they size themselves based on the widest columns in any of the grids? Ideally we'd like the grids to all be the same width and the columns to be aligned.
6 Answers, 1 is accepted
The closest option I can offer you is to specify equal widths for both grids and their columns in pixels. Finding the widest column in any of the grids and equalizing other grids and their columns can lead to unpredictable results - even layout cycles.Best wishes,
the Telerik team
Thanks for the reply. Unfortunately hard coding the column widths is not an option since the data is dynamic. I have no way of knowing how wide to make them, because the data today will be different than the data tomorrow.
It is possible to set the width of the grid to a percentage? Even if the columns did not line up exactly, if the grids were the same width that would be helpful.
But no luck so far.
I'm referring to Grid and how size UI elements associated with ColumnDefinition and RowDefinition.Best wishes,
the Telerik team
But just to clarify, all UI elements for this application are built dynamically in code-behind. I cannot specify a size in pixels because I do not know what the data length will be. Yet, I cannot use a star sized values in code-behind (or at least I haven't found a way yet) since the GridLength and associated methods require a double value, whether it is for the whole grid or for individual columns. If I could specify manually in pixels that would work great, but that's not an option here.