Three bugs ?

1 posts, 0 answers
  1. yjh
    yjh avatar
    67 posts
    Member since:
    Aug 2007

    Posted 18 Jul 2012 Link to this post

    <UserControl x:Class="SilverlightApplication1.MainPage"
        mc:Ignorable="d"
        d:DesignHeight="600" d:DesignWidth="800">
      
        <UserControl.Resources>
              
            <Style TargetType="Button">
                  
                <Setter Property="Width" Value="180"/>
                  
            </Style>
              
        </UserControl.Resources>
      
        <!--<ScrollViewer VerticalAlignment="Top" HorizontalScrollBarVisibility="Auto">-->
      
            <telerik:RadGridView x:Name="TestRadGV"
                telerik:StyleManager.Theme="Office_Blue" RowIndicatorVisibility="Collapsed"
                AutoGenerateColumns="False" ShowGroupPanel="False" CanUserReorderColumns="False"
                CanUserResizeColumns="False" CanUserFreezeColumns="False">
                  
                <telerik:RadGridView.Columns>
                      
                    <telerik:GridViewDataColumn Header="1"
                        DataMemberBinding="{Binding Name}" MinWidth="200" Width="0.275*"/>
      
                    <telerik:GridViewDataColumn Header="2"
                        DataMemberBinding="{Binding DName}" MinWidth="200" Width="0.275*"/>
      
                    <telerik:GridViewDataColumn Header="3"
                        DataMemberBinding="{Binding Description}" MinWidth="300" Width="0.45*"/>
      
                    <telerik:GridViewDataColumn>
                      
                        <telerik:GridViewDataColumn.CellTemplate>
                          
                            <DataTemplate>
      
                                <TextBlock Text="Test" HorizontalAlignment="Center"/>
                                 
                            </DataTemplate>                    
                          
                        </telerik:GridViewDataColumn.CellTemplate>
                      
                    </telerik:GridViewDataColumn>
                      
                </telerik:RadGridView.Columns>
                              
            </telerik:RadGridView>
      
        <!--</ScrollViewer>-->
      
    </UserControl>

    using System.Collections.Generic;
    using System.Windows.Controls;
      
    namespace SilverlightApplication1
    {
        public class Item
        {
            public string Name { get; set; }
      
            public string DName { get; set; }
      
            public string Description { get; set; }
        }
      
        public partial class MainPage : UserControl
        {
            public MainPage()
            {
                InitializeComponent();
      
                var items = new List<Item>();
      
                items.Add(new Item
                {
                    Name = "1",
      
                    DName = "1",
      
                    Description = "1"
                });
      
                items.Add(new Item
                {
                    Name = "2",
      
                    DName = "2",
      
                    Description = "2"
                });
      
                items.Add(new Item
                {
                    Name = "3",
      
                    DName = "3",
      
                    Description = "3"
                });
      
                TestRadGV.ItemsSource = items;
            }
        }
    }

    Just run above codes, you will find:

    1.  One column header line will disappear when iexplorer window width maximized or changed.It is a old issue:
    http://www.telerik.com/community/forums/silverlight/gridview/radgridview-add-an-extra-column-at-the-end.aspx#1742535

    2.  Using implicit style on button will make GridView's filter button not rightmost. The filter button must define width property explicitly.

    3   If uncomment ScrollViewer code, will get a very long GridView. RadGridView has a wrong behavior to process a star value of width property, look this thread:
    http://www.telerik.com/community/forums/silverlight/gridview/scrolling-behavior-gridview-in-docking-inside-scrollviewer.aspx
Back to Top