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

RadGridView "jumps"

2 Answers 130 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Sergey
Top achievements
Rank 1
Sergey asked on 30 Oct 2012, 09:58 AM
Hello!

I have following xaml:

<Window x:Class="WPFExample.MainWindow"
    xmlns:local="clr-namespace:WPFExample"
    Title="MainWindow" Height="350" Width="525"
    xmlns:sys="clr-namespace:System;assembly=mscorlib">
<Window.Resources>
    <x:ArrayExtension Type="{x:Type local:Model}" x:Key="Models">
        <local:Model StringProp="Some value" Int32Prop="3" />
        <local:Model StringProp="Another one" Int32Prop="12" />
        <local:Model StringProp="The same" Int32Prop="132" />
        <local:Model StringProp="Tired..." Int32Prop="-5" />
        <local:Model StringProp="End it" Int32Prop="43" />
        <local:Model StringProp="..." Int32Prop="11" />
        <local:Model StringProp="the end." Int32Prop="12" />
    </x:ArrayExtension>
</Window.Resources>
<ScrollViewer ScrollViewer.VerticalScrollBarVisibility="Auto">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <telerik:RadGridView  x:Name="grid" ItemsSource="{StaticResource Models}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewColumn >
                    <telerik:GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <ComboBox Width="200">
                                <ComboBox.Items>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                </ComboBox.Items>
                            </ComboBox>
                        </DataTemplate>
                    </telerik:GridViewColumn.CellTemplate>
                </telerik:GridViewColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
 
        <telerik:RadGridView x:Name="grid1" Grid.Row="1" ItemsSource="{StaticResource Models}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <ComboBox Width="200">
                                <ComboBox.Items>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                </ComboBox.Items>
                            </ComboBox>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
 
        <telerik:RadGridView x:Name="grid2" Grid.Row="2" ItemsSource="{StaticResource Models}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn>
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <ComboBox Width="200">
                                <ComboBox.Items>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                    <sys:String>String 1</sys:String>
                                </ComboBox.Items>
                            </ComboBox>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</ScrollViewer>

It's just simple window with three radgridviews, all of a kind.

Problem: if one of radgridviews not entirely visible and i click on combobox within this radgridview, then it first jumps into view, and just then combobox click processed. How can i remove this behaviour, coz i don't need radgridview to be fully visible?

Thank you.

2 Answers, 1 is accepted

Sort by
0
Sergey
Top achievements
Rank 1
answered on 30 Oct 2012, 01:26 PM
For now i use this workaround:

private void RadGridView_RequestBringIntoView(object sender, RequestBringIntoViewEventArgs e)
{
    e.Handled = true;
}

But is there are better solution?
0
Vera
Telerik team
answered on 30 Oct 2012, 04:13 PM
Hello Sergey,

 
We are glad that you have found an appropriate solution. 

Regards,
Vera
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Sergey
Top achievements
Rank 1
Answers by
Sergey
Top achievements
Rank 1
Vera
Telerik team
Share this question
or