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

Show detail row will cause tremble problem

1 Answer 72 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ke
Top achievements
Rank 1
Ke asked on 28 Sep 2011, 07:26 AM
I use row detail in radgridview but encounter some tricky problem. Please use the code below, and click the + to show the detail row one by one, at least open one screen, then scroll the vertical scrollbar , or use mouse wheel, then if you are lucky, the sceen will tremble, unless you scroll again. To reproduce it maybe need some fortume, but i could reproduce it everytime. I am not sure if I make myself clear. How to solve this problem? Thanks.

<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"   
        mc:Ignorable="d"
        Title="MainWindow" d:DesignHeight="1024" d:DesignWidth="1280" MinHeight="700" MaxHeight="1024" MaxWidth="1280" SnapsToDevicePixels="True">
    <Grid>       
        <telerik:RadGridView x:Name="radGridView" AutoGenerateColumns="False" IsReadOnly="True">            
            <telerik:RadGridView.Columns>
                <telerik:GridViewToggleRowDetailsColumn/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding ID}" Header="" Width="600"/>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding UserID}" TextAlignment="Center"  Header="CUSIP" Width="400" />
                <telerik:GridViewDataColumn DataMemberBinding="{Binding ClientID}" TextAlignment="Center" Header="PRCMnum" Width="400" />
            </telerik:RadGridView.Columns>
 
            <telerik:RadGridView.RowDetailsTemplate>
                <DataTemplate>                    
                    <Grid x:Name="rowDetails">
                        <StackPanel Orientation="Horizontal" Margin="200,5,0,5">
                            <Label Content="ID:" Margin="0,0,5,0"/>
                            <TextBox Text="{Binding ID}"  Width="80" />                                    
                            <Label Content="UserID:" Margin="10,0,5,0"/>
                            <TextBox Text="{Binding UserID}"  Width="80" />
                            <Label Content="ClientID:" Margin="10,0,5,0"/>
                            <TextBox Text="{Binding ClientID}" Width="80" />                                    
                        </StackPanel>                        
                    </Grid>                       
                </DataTemplate>
            </telerik:RadGridView.RowDetailsTemplate>
        </telerik:RadGridView>        
    </Grid>
</Window>

using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Documents;
using System.Collections.ObjectModel;
 
namespace WpfApplication1
{   
    public partial class MainWindow : Window
    {
        
        public MainWindow()
        {
            InitializeComponent();          
           
            this.radGridView.ItemsSource = new ObservableCollection<AgencySpecPool>(GetSpecPoolInfoHierarchy());    
        }
 
        List<AgencySpecPool> GetSpecPoolInfoHierarchy()
        {
            List<AgencySpecPool> list = new List<AgencySpecPool>();
            for (int i = 0; i < 1000; i++)
            {
                int seed = (int)DateTime.Now.Ticks + i;
                Random rand = new Random(seed);
                list.Add(new AgencySpecPool(rand.Next(), rand.Next(), rand.Next()));
            }
            return list;
        }
    }
 
    public class AgencySpecPool
    {        
        public int ID {get;set;}
        public int UserID { getset; }
        public int ClientID { getset; }
        public AgencySpecPool(int id, int uid, int cid)
        {
            ID = id;
            UserID = uid;
            ClientID = cid;
        }
    }
}

1 Answer, 1 is accepted

Sort by
0
Yordanka
Telerik team
answered on 28 Sep 2011, 10:41 AM
Hello Ke,

Thank you for the feedback.
Indeed, there is an issue with scrolling a grid with RowDetails and columns with fixed width. I've logged it in our PITS system where you can track its progress - ID7985.
The  problem is not available if one of the columns has Auto or Star width.

I have updated your Telerik points.
 
Regards,
Yordanka
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

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