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

[Solved] Highlight selected row without selecting a column

4 Answers 177 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ashton
Top achievements
Rank 2
Ashton asked on 07 Dec 2010, 03:41 PM
I am trying to just select the row in the grid view without setting focus to a column. In version "2010.1.422.1030" this was not a problem. After installing version "2010.2.714.1040" when a row was selected it set focus to the column that was clicked. I'm looking to select the row without it setting focus to a column. The girdview is set to read only. See code below.
<UserControl x:Class="RankSelection.RankSelectionView"
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" 
    xmlns:CustomCommands="clr-namespace:Common.Commands;assembly=Common" 
    Height="300">
    <Grid x:Name="LayoutRoot_Copy" Margin="10">
        <telerik:RadGridView            
                ItemsSource="{Binding SourceRank}"
                SelectedItem="{Binding Path=SelectedRank, Mode=TwoWay}"         
                RowIndicatorVisibility="Collapsed"
                AutoGenerateColumns="False" 
                CanUserInsertRows="False" 
                IsReadOnly="True" 
                CanUserFreezeColumns="False">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn Header="Rank Description" DataMemberBinding="{Binding Description}" Width="275"/>
                <telerik:GridViewDataColumn Header="Last Modified" DataMemberBinding="{Binding ModifiedDate}"  DataFormatString="{}{0:d}" Width="125"/>
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</UserControl>

Any help would be appreciated,
Mark

4 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 07 Dec 2010, 06:20 PM
Hello Ashton,


Why not use the approach demonstrated at the attached sample application? Actually it is enough to remove the default Tab experience represented in GridViewCell's Current state. Since your RadGridView is readonly you do not need this behavior and remove Current State as part of GridViewCell template.

Please see the attached project and let me know how this works in your case.


Regards,
Vanya Pavlova
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Ashton
Top achievements
Rank 2
answered on 07 Dec 2010, 08:57 PM
Yes, this does what I was looking for in the grid view. But What I am looking for is that when I select a row in the grid view I populate the data selected in a detail window. Then focus is set to the first item in the detail window. When it first comes up with the grid view and detail window,  the first item in the detail window has focus and is selected. When you click on a row, the detail window will change to reflect the grid view selection but does not set focus and select the data. This was performing just right in version "2010.1.422.1030", but quit working in version "2010.2.714.1040" . In the previous version when you selected a row the detial had focus set and the itme was selected.
 I have attached some screen snippets to give you an idea of what it looks like. I have the code I chould send you but it is 16mg zipped.

Thanks for any help you can give me,
Mark
0
Vanya Pavlova
Telerik team
answered on 08 Dec 2010, 11:23 AM
Hello Ashton,


If you defined an implicit style for a GridViewCell as it was shown in my previous post, it is applied to all cells in our RadGridView, the style should work fine.
 
Can you please send us a small application via support ticket which can help us to investigate the issue locally.

Best wishes,
Vanya Pavlova
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
Ashton
Top achievements
Rank 2
answered on 08 Dec 2010, 02:19 PM
I work for the Air Force and am waiting on them to renew our subscription. At this time I can't send a support ticket. The project is 16mg zipped and it is just part of it. If I can though I will try to create a smaller version of to send you.

Thanks for your help so far,
Mark
Tags
GridView
Asked by
Ashton
Top achievements
Rank 2
Answers by
Vanya Pavlova
Telerik team
Ashton
Top achievements
Rank 2
Share this question
or