This question is locked. New answers and comments are not allowed.
I have a gridview that contains a cell which contains a stackpanel which contains 4 textboxes. I need the textboxes to be star sized so they'll fill the entire space in the grid cell. When I add Height="*" & Width="*" to the textboxes, I get an error, "Failed to create a 'System.Double' from the text '*'." The issue is there is spacing around the textboxes inside the cell. This only occurs when you have the column hidden at design time and then show it at run time. Also, GridView.UpdateLayout doesn't help.
Here is an example XAML:
Here is an example XAML:
<UserControl xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="SilverlightApplication1.MainPage" mc:Ignorable="d" d:DesignHeight="500" d:DesignWidth="500"> <Grid x:Name="LayoutRoot" Background="White"> <StackPanel> <Button Height="50" Width="50" Margin="10,10,10,10" Name="Button1" /> <telerik:RadGridView Name="FileList" Width="450" BorderThickness="0" AutoGenerateColumns="False"> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn IsVisible="True" DataMemberBinding="{Binding FirstName}" Header="First Name" Width="100" UniqueName="FirstNameColumn"/> <telerik:GridViewDataColumn IsVisible="True" DataMemberBinding="{Binding LastName}" Header="Last Name" UniqueName="LastNameColumn" Width="*"/> <telerik:GridViewDataColumn IsVisible="False" DataMemberBinding="{Binding FirstName}" Header="Last Name and Age" UniqueName="LastAndAgeColumn" Width="*"> <telerik:GridViewDataColumn.CellTemplate> <DataTemplate> <StackPanel x:Name="TestPanel"> <TextBox Background="Cornsilk" Text="Last" /> <TextBox Background="WhiteSmoke" Text="{Binding LastName}" /> <TextBox Background="Cornsilk" Text="Folder" /> <TextBox Background="WhiteSmoke" Text="{Binding Age}" /> </StackPanel> </DataTemplate> </telerik:GridViewDataColumn.CellTemplate> </telerik:GridViewDataColumn> </telerik:RadGridView.Columns> </telerik:RadGridView> </StackPanel> </Grid></UserControl>