This is a migrated thread and some comments may be shown as answers.

Version 2011.0315.1040 GridViewColumn does not show when setting a width

4 Answers 74 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 1
Richard asked on 18 Mar 2011, 08:31 PM
I'm using the latest version of the RadGrid (2011.0315.1040) and when I specify a Width="" on a GridViewColumn or GridViewDataColumn the column will not show. See Example, in this case the FirstName column will not show;

<UserControl xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"  x:Class="EUC3.Views.MoreCrap"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    xmlns:local="clr-namespace:EUC3.Views"
    d:DesignHeight="300" d:DesignWidth="400">
    
    <UserControl.Resources>
        <local:NameList x:Key="PersonNameData" />
    </UserControl.Resources>
    
    <Grid x:Name="LayoutRoot" Background="White">
        <telerik:RadGridView x:Name="Grid1" ItemsSource="{Binding Source={StaticResource PersonNameData}}"
            CanUserDeleteRows="False" CanUserInsertRows="False" IsReadOnly="True"
            CanUserReorderColumns="True" SelectionMode="Single" AutoGenerateColumns="False"
            ShowGroupPanel="False" IsFilteringAllowed="True"
            AlternateRowBackground="#FFF5FAFE"                                   
            GridLinesVisibility="Vertical" CanUserSortColumns="True" BorderBrush="#FF00538E" 
            Foreground="#FF011E39" Background="#FFFFFFFF">
            
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="First Name" DataMemberBinding="{Binding FirstName}" Width="100"/>
                <telerik:GridViewDataColumn Header="Last Name" DataMemberBinding="{Binding LastName}"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</UserControl>

Code behind:


using System.Collections.ObjectModel;
using System.Windows.Controls;
 
namespace EUC3.Views
{
    public partial class MoreCrap : UserControl
    {
        public MoreCrap()
        {
            InitializeComponent();
        }
    }
 
    public class NameList : ObservableCollection<PersonName>
    {
        public NameList()
            : base()
        {
            Add(new PersonName("Willa""Cather"));
            Add(new PersonName("Isak""Dinesen"));
            Add(new PersonName("Victor""Hugo"));
            Add(new PersonName("Jules""Verne"));
        }
    }
 
    public class PersonName
    {
        private string firstName;
        private string lastName;
 
        public PersonName(string first, string last)
        {
            this.firstName = first;
            this.lastName = last;
        }
 
        public string FirstName
        {
            get { return firstName; }
            set { firstName = value; }
        }
 
        public string LastName
        {
            get { return lastName; }
            set { lastName = value; }
        }
    }
 
 
}

4 Answers, 1 is accepted

Sort by
0
Yordanka
Telerik team
answered on 21 Mar 2011, 10:07 AM
Hi Richard,

Thank you for the feedback.
Indeed, this issue can be reproduced with our Q1 2011 version. But, it is already fixed and the fix will be part of our latest internal build which will be available later today. 

Please, excuse us for the inconvenience caused.
 
All the best,
Yordanka
the Telerik team
0
Rob
Top achievements
Rank 1
answered on 21 Mar 2011, 06:03 PM
Hello Yordanka,

Is the fixed internal build available now - what is the version number?

Thanks,
Rob
0
Yordanka
Telerik team
answered on 22 Mar 2011, 01:51 PM
Hi Rob,

The latest internal build (version .0322) is already available for download under Your Account.
 
Kind regards,
Yordanka
the Telerik team
0
Rob
Top achievements
Rank 1
answered on 22 Mar 2011, 04:08 PM
Great!  Will try it...



Tags
GridView
Asked by
Richard
Top achievements
Rank 1
Answers by
Yordanka
Telerik team
Rob
Top achievements
Rank 1
Share this question
or