GridView with Group causes odd behaviors when editing

5 posts, 2 answers
  1. Steve
    Steve avatar
    124 posts
    Member since:
    Jun 2011

    Posted 15 Jul 2013 Link to this post

    Hi Again,
    I am using the grouping feature of the GridView and have just discovered some odd behavior when editing.  I am using version 2013.2.611.40.
    Refer to the attached image for an illustration of the behavior.  My GridView has two columns, the first of which is read only.  When I tab to the second column and hit F2 it enters edit mode as expected.  When I tab out of the cell, the next row is repositioned as the top row in the group and the previous first row is now at the bottom of the group.  This behavior persists with each tab.  In addition if I escape (twice) out of the edit all keyboard navigation ceases to work; tab (shift tab) and all arrow keys.  If I use the mouse to move to another cell, the navigation begins to work again; however the repositioning of the rows continues.  I have been unable to reproduce this behavior in the Telerik Demos, so I am at a total loss as to what could be causing this.  Obviously, I must find a solution to this.  Below is the xaml for the GridView. 

    <telerik:RadGridView x:Name="AccountGroupsGridView"
                         HorizontalAlignment="Stretch"
                         VerticalAlignment="Stretch"
                         Width="{Binding ElementName=LayoutRoot, Path=ActualWidth}"
                         Height="{Binding ElementName=LayoutRoot, Path=ActualHeight}"
                         ScrollViewer.VerticalScrollBarVisibility="Auto"
                         ScrollViewer.HorizontalScrollBarVisibility="Auto"
                         IsSynchronizedWithCurrentItem="True"
                         AutoGenerateColumns="False"
                         VerticalGridLinesBrush="Transparent"
                         AlternationCount="2"
                         AlternateRowBackground="AliceBlue"
                         CanUserDeleteRows="True"
                         CanUserInsertRows="True"
                         ColumnWidth="*"
                         ShowGroupPanel="False"
                         RowIndicatorVisibility="Collapsed"
                         Focusable="False"
                         ItemsSource="{Binding Path=AccountGroups}">
        <telerik:RadGridView.Columns>
            <telerik:GridViewDataColumn x:Name="AccountGroupCodeColumn"
                                        UniqueName="AccountGroupCodeColumn"
                                        Header="{x:Static localProperties:Resources.Account_Group_Code}"
                                        DataMemberBinding="{Binding Path=AccountGroupCode,
                                            Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                        Width="200"
                                        IsReadOnly="False"
                                        IsFilterable="False"
                                        IsGroupable="False"
                                        IsSortable="False"
                                        IsResizable="False"
                                        ShowFieldFilters="False"
                                        ShowFilterButton="False"
                                        ShowDistinctFilters="False">
            </telerik:GridViewDataColumn>
            <telerik:GridViewDataColumn x:Name="DescriptionColumn"
                                        UniqueName="DescriptionColumn"
                                        Header="{x:Static localProperties:Resources.Description}"
                                        Width="*"
                                        DataMemberBinding="{Binding Path=Description,
                                            Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                                        IsFilterable="False"
                                        IsGroupable="False"
                                        IsSortable="False"
                                        ShowFieldFilters="False"
                                        ShowFilterButton="False"
                                        ShowDistinctFilters="False">
            </telerik:GridViewDataColumn>
        </telerik:RadGridView.Columns>
        <telerik:RadGridView.GroupDescriptors>
            <telerik:GroupDescriptor Member="AccountCategory.CategoryName" />
        </telerik:RadGridView.GroupDescriptors>
     
    </telerik:RadGridView>



    Note: In the image you'll notice that I have restyled to look of the GridView; however all I did was change brushes and did not introduce any new behavior. 

    Thanks in advance,
    Steve
  2. Answer
    Yordanka
    Admin
    Yordanka avatar
    634 posts

    Posted 16 Jul 2013 Link to this post

    Hello Steve,

    Thank you for the feedback.

    Could you please specify what is the data source of the grid? If it is an ICollectionView, then indeed we are aware of a similar problem. Unfortunately, for the time being we do not have a solution for this case. What we can suggest is using a QueryableCollectionView instead. Let me know if this is your case.
     
    Regards,
    Yordanka
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Steve
    Steve avatar
    124 posts
    Member since:
    Jun 2011

    Posted 16 Jul 2013 Link to this post

    Using QueryableCollectionView solves the first part of the problem involving the reordering of the rows.
    Thanks,
    Steve
  5. Answer
    Yordanka
    Admin
    Yordanka avatar
    634 posts

    Posted 18 Jul 2013 Link to this post

    Hello Steve,

    About the problem with keyboard Tab, Shift+Tab navigation, please set 
    Focusable="True" and everything will work as expected.
     
    Regards,
    Yordanka
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  6. Steve
    Steve avatar
    124 posts
    Member since:
    Jun 2011

    Posted 18 Jul 2013 Link to this post

    Yes I caught that too.
    Thanks again,
    Steve
Back to Top
UI for WPF is Visual Studio 2017 Ready