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

GridView display incomplete after drag an outer gridSplitter

1 Answer 76 Views
GridView
This is a migrated thread and some comments may be shown as answers.
rui
Top achievements
Rank 1
rui asked on 05 Jan 2018, 08:47 AM

when drag an outer gridSplitter  the gridview  display incomplete

the step is

1.  drag the gridview's scrollbar to bottom

 2. drag up the red gridSplitter 

3. then the gridview display incomplete

my code is as follows

<Window x:Class="RadComboBoxStyling.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:example="clr-namespace:RadComboBoxStyling"
        Title="MainWindow"
         WindowState="Maximized">
    <Window.Resources>
        <example:AgencyViewModel x:Key="DataSource" />
    </Window.Resources>    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="3*" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <GridSplitter Height="2"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Bottom"
                      Background="Red"
                      ShowsPreview="True" />
        <telerik:RadTabControl Grid.Row="1">
            <telerik:RadTabItem>
                <telerik:RadGridView  ItemsSource="{Binding Source={StaticResource DataSource}, Path=TestData}" />
            </telerik:RadTabItem>
        </telerik:RadTabControl>
    </Grid>
</Window>

class AgencyViewModel
    {
        public AgencyViewModel()
        {
            TestData = new DataTable();
            testData.Columns.Add(new DataColumn { ColumnName = "aa" });
            testData.Columns.Add(new DataColumn { ColumnName = "bb" });
            for (int i = 0; i < 10; i++)
            {
                testData.Rows.Add(new string[] { "testaa" + i, "testbb" + i });
            }
        }

        private DataTable testData;

        public DataTable TestData
        {
            get { return testData; }
            set { testData = value; }
        }
    }

1 Answer, 1 is accepted

Sort by
0
rui
Top achievements
Rank 1
answered on 05 Jan 2018, 08:56 AM

Delete the RadTabControl  the issue is also exist  the xaml code is as follow

<Window x:Class="RadComboBoxStyling.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:example="clr-namespace:RadComboBoxStyling"
        Title="MainWindow"
         WindowState="Maximized">
    <Window.Resources>
        <example:AgencyViewModel x:Key="DataSource" />
    </Window.Resources>    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="3*" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <GridSplitter Height="2"
                      HorizontalAlignment="Stretch"
                      VerticalAlignment="Bottom"
                      Background="Red"
                      ShowsPreview="True" />
        <telerik:RadGridView Grid.Row="1"
                             ItemsSource="{Binding Source={StaticResource DataSource}, Path=TestData}" />
    </Grid>
</Window>

Tags
GridView
Asked by
rui
Top achievements
Rank 1
Answers by
rui
Top achievements
Rank 1
Share this question
or