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

RadGridView columns

8 Answers 197 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Fabiana
Top achievements
Rank 1
Fabiana asked on 27 Jul 2010, 01:18 PM
Hello support!!

I just inserted a RadGridView, with some columns... and I noticed a strange comportament when I resize window. See my image too.

Column division was strange. Why?


See code, very simple:



<UserControl x:Class="SilverlightApplication1.MainPage"
    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"
    d:DesignHeight="600" d:DesignWidth="800" MinHeight="568" MinWidth="800"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:xx="clr-namespace:SilverlightApplication1" >


    <Grid x:Name="LayoutRoot" Margin="0,0,0,0">

        <telerik:RadGridView HorizontalAlignment="Stretch" Margin="24,53,22,0" Name="radGridView" VerticalAlignment="Stretch">
            <telerik:RadGridView.Columns>
                <telerik:GridViewColumn  Header="Name000" Width="*"/>
                <telerik:GridViewColumn Header="Name111" Width="*"/>
                <telerik:GridViewColumn Header="Name222" Width="*"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>

    </Grid>
    
    
</UserControl>



---------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections;
using System.Collections.ObjectModel;
using System.Windows.Data;



namespace SilverlightApplication1
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
        }

    }

}

8 Answers, 1 is accepted

Sort by
0
Yavor Georgiev
Telerik team
answered on 27 Jul 2010, 01:57 PM
Hello Fabiana,

 Could you please explain in a bit more detail what exactly is the issue and what steps we should take to reproduce it? Do you mean that when you resize the window, the columns in the GridView also resize?

Greetings,
Yavor Georgiev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Fabiana
Top achievements
Rank 1
answered on 27 Jul 2010, 02:13 PM
I am using default theme ( Office Black ) . But I can see it in any theme.

If you resize very slow page, columns resize too ( PERFECT !! ) , I configured to do it !!


        <telerik:RadGridView HorizontalAlignment="Stretch" Margin="24,53,22,0" Name="radGridView" VerticalAlignment="Stretch">
            <telerik:RadGridView.Columns>
                <telerik:GridViewColumn  Header="Name000" Width="*"/>
                <telerik:GridViewColumn Header="Name111" Width="*"/>
                <telerik:GridViewColumn Header="Name222" Width="*"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>


But In some moment of resize event, column division lost, see in another image using OfficeBlue theme.
And continuous resizing, column division appear, very, very strange!!!

Thanks!
0
Yavor Georgiev
Telerik team
answered on 27 Jul 2010, 03:04 PM
Hello Fabiana,

 We have managed to reproduce this behavior. However, we are not sure the issue lies with RadGridView or the Silverlight framework. We will try to investigate and we will let you know if something comes up.

Best wishes,
Yavor Georgiev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Fabiana
Top achievements
Rank 1
answered on 27 Jul 2010, 04:02 PM
Please, investigate it, because is very simple to see this problem, as you can see im my code, I just created a radGridView with 3 columns...and no information in this grid! And I saw this problem. Thanks!

<UserControl x:Class="SilverlightApplication1.MainPage"
    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"
    d:DesignHeight="600" d:DesignWidth="800" MinHeight="568" MinWidth="800"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:xx="clr-namespace:SilverlightApplication1" >


    <Grid x:Name="LayoutRoot" Margin="0,0,0,0">

        <telerik:RadGridView HorizontalAlignment="Stretch" Margin="24,53,22,0" Name="radGridView" VerticalAlignment="Stretch">
            <telerik:RadGridView.Columns>
                <telerik:GridViewColumn  Header="Name000" Width="*"/>
                <telerik:GridViewColumn Header="Name111" Width="*"/>
                <telerik:GridViewColumn Header="Name222" Width="*"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>

    </Grid>
    
    
</UserControl>



0
sonam
Top achievements
Rank 1
answered on 08 Apr 2011, 07:06 AM
hi telerik,
i am working with radgridview and come to face a strange problem with binding. as i know that the default binding mode is 'one way' and if we want to 'two way' mode we have to explicitly specify it .but in my code which i am posting here,the Daat Element column is working in two way manner without specifying it, while checkbox chkIsActive and textblock txtCategory are requiring to mention mode two way otherwise they are not working well . if i try to provide mode 'two way' to the listbox itemsource and not to its child controls then still it behave like one way. please explian me , such behaviour of controls.  
<telerik:RadGridView Grid.Row="1" Grid.Column="0" x:Name="DECategoryMapping" CanUserReorderColumns="True" CanUserResizeColumns="True" CanUserSortColumns="True" AutoGenerateColumns="False" IsEnabled="True">
  
<telerik:RadGridView.Columns>
  
<telerik:GridViewDataColumn DataMemberBinding="{Binding Path=DENameList}" Header="Data Element"></telerik:GridViewDataColumn>
  
<telerik:GridViewDataColumn UniqueName="CategoryList" Header="Category List" DataMemberBinding="{ Binding Path=DElement.Category}">
  
<telerik:GridViewDataColumn.CellTemplate>
  
<DataTemplate>
  
<telerik:ListBox x:Name="lstCategory" ItemsSource="{Binding Path=Category}">
  
<telerik:ListBox.ItemTemplate>
  
<DataTemplate
  
<StackPanel Orientation="Horizontal">
  
<CheckBox x:Name="chkIsActive" IsChecked="{Binding Path=IsActive, Mode=TwoWay}"></CheckBox>
  
<TextBlock x:Name="txtCategory" Text="{Binding Path=CategoryName, Mode=TwoWay}"></TextBlock>
  
</StackPanel>
  
</DataTemplate>
  
</telerik:ListBox.ItemTemplate>
  
</telerik:ListBox>
  
</DataTemplate>
  
</telerik:GridViewDataColumn.CellTemplate>
  
</telerik:GridViewDataColumn>
  
</telerik:RadGridView.Columns>
  
</telerik:RadGridView>
0
Yavor Georgiev
Telerik team
answered on 08 Apr 2011, 08:39 AM
Hello sonam,

 The default value of Binding.Mode varies by control. For instance, the default for TextBox is Mode=TwoWay, whereas for CheckBox is Mode=OneWay. Likewise, unless told otherwise, GridViewDataColumn will assume that the binding is TwoWay.

 Also, setting the mode in the binding of the ItemsSource property of an ItemsControl will not set the default binding mode for any of its children.

 One more thing: the telerik ListBox is not an officially supported control. It is used internally by RadScheduler and may be deprecated in the near future. I advise you to not depend on this control.

 In the feature please start a new forum thread on the topic that interests you - this will enable us to help you faster and more efficiently.

Kind regards,
Yavor Georgiev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
sonam
Top achievements
Rank 1
answered on 08 Apr 2011, 10:50 AM
hi telerik,
thanks for answering. pls tell me the path from where i can start a new thread.
0
Yavor Georgiev
Telerik team
answered on 08 Apr 2011, 11:08 AM
Hi sonam,

 Simply go to any of our forums (for instance: RadGridView for Silverlight forum) and click the New Thread button.

Greetings,
Yavor Georgiev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Fabiana
Top achievements
Rank 1
Answers by
Yavor Georgiev
Telerik team
Fabiana
Top achievements
Rank 1
sonam
Top achievements
Rank 1
Share this question
or