Up / Down Keys Not Work after Switch to Sibling ChildGridViewTemplate in 2009Q3Beta

7 posts, 0 answers
  1. Tom Chien
    Tom Chien avatar
    125 posts
    Member since:
    Jun 2009

    Posted 20 Oct 2009 Link to this post

    I just installed Telerik Q3 2009 WinForms BETA (2009.2.9.1016) over Q2 2009 (2009.2.9.729) and the Up and Down keys stopped working in at least the following scenario:

    1. Click on any Row in a ChildGridViewTemplate of the MasterGiewTemplate.
    2. Switch to a Sibling (not Cousin) of that ChildGridViewTemplate,
    3. If the CurrentRow jumps up to the Parent Row of the ChildGridViewTemplate, press the Down Key to move the CurrentRow into Sibling ChildGridViewTemplate, else proceed to step 4.
    4. Pressing Up and Down Key after the 1st 0 to 1 times no longer move the CurrentRow (unless I click on another Row).

    The only RadGridView change mentioned was removing separate Vertical Scroll Bars for Grids with ChildGridViewTemplates.

    Telerik 2009Q3 Beta (2009.2.9.1016), VS 2005 (v8.0.50727.762 SP.050727-7600), XP SP3 on Core2Duo 2.99GHZ with 3GB.
  2. Jack
    Admin
    Jack avatar
    2333 posts

    Posted 23 Oct 2009 Link to this post

    Hi Tom,

    Thank you for reporting this issue. I logged it in our bug tracking system. Your Telerik points are updated.

    Sincerely yours,
    Jack
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Tom Chien
    Tom Chien avatar
    125 posts
    Member since:
    Jun 2009

    Posted 10 Nov 2009 Link to this post

    I verified this is still a bug in the final release of Q3 2009.  Although, it applies to switching Tabs via mouse or keyboard, it's really critical for keyboard access, because it makes the workarounds y'all gave me for the Ctrl-Page Up / Ctrl-Page Down Shortcut Keys for Previous / Next Tab pretty pointless since they'd have to use the mouse anyway to regain use of the Up / Down keys.  They may as well use the mouse exclusively.  http://www.telerik.com/community/forums/winforms/gridview/change-to-different-sibling-childgridviewtemplate-programmatically-in-radgridview.aspx

    Are y'all going to fix it?
  5. Jack
    Admin
    Jack avatar
    2333 posts

    Posted 13 Nov 2009 Link to this post

    Hi Tom Chien,

    I confirm that the issue appears in the final Q3 release - sorry for this. We will try to address it for the upcoming service pack.

    I managed to work around the issue by using custom details cell that inherits from GridDetalViewCellElement. You should handle the TabSelected event and change the current row manually. Here is the code:

    Private Sub radGridView1_CreateCell(ByVal sender As Object, ByVal e As GridViewCreateCellEventArgs)
        If e.CellType Is GetType(GridDetailViewCellElement) Then
            e.CellType = GetType(CustomDetailsCell)
        End If
    End Sub
     
    Public Class CustomDetailsCell
        Inherits GridDetailViewCellElement
        Private subscribed As Boolean
       
        Public Sub New(ByVal column As GridViewColumn, ByVal row As GridRowElement)
            MyBase.New(column, row)
        End Sub
       
        Public Overloads Overrides Sub UpdateInfo()
            MyBase.UpdateInfo()
            If Not subscribed Then
                subscribed = True
                AddHandler Me.TabStripElement.TabSelected, AddressOf TabStripElement_TabSelected
            End If
        End Sub
       
        Private Sub TabStripElement_TabSelected(ByVal sender As Object, ByVal args As TabEventArgs)
            Dim detailsRowInfo As GridViewDetailsRowInfo = DirectCast(Me.RowInfo, GridViewDetailsRowInfo)
            If detailsRowInfo.ChildViewInfo.RootGroup.RowCount > 0 Then
                Me.GridControl.CurrentView = Me.ChildTableElement
                detailsRowInfo.ChildViewInfo.RootGroup(0).IsCurrent = True
            End If
        End Sub
    End Class

    I hope it helps. I updated your Telerik points for this report.

    Greetings,
    Jack
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Tom Chien
    Tom Chien avatar
    125 posts
    Member since:
    Jun 2009

    Posted 18 Nov 2009 Link to this post

    1. Thanks, the workaround helps but it still often gets stuck.  Sometimes, when you switch Tabs, only one Cell vs. the whole Row is highlighted at which point pressing Up / Down once will highlight the whole Row, but pressing it again does nothing.  Sometimes, pressing Up a 2nd time will move up a Row.  In Q2 2009, in the 1st Tab, it would highlight always just 1 Cell, but would still allow moving to previous / next Row with the Up / Down key albeit still with only 1 Cell highlighted on each Row.  In the 2nd+ Tabs, it would often highlight always just 1 Cell when switching to it and also still allow moving to previous / next Row with the Up / Down key, but after the 1st Up / Down Key, it starts highlighting the whole Row.

    2. I look forward to the fix in Q3 2009 you promised.

    3. Also, I'm getting "Object reference not set to an instance of an object." when I Down key into an empty Tab.  Sometimes, I get it even on Tabs that have Rows.  That's with or without your work around.

    4. I don't know if it's supposed to do this, but I will need to Up / Down into an empty Tabs on read-only Grids because I have ContextMenu options (i.e. "New Row") I need to be available via keyboard even on empty Tabs.

  7. Tom Chien
    Tom Chien avatar
    125 posts
    Member since:
    Jun 2009

    Posted 18 Nov 2009 Link to this post

    5. I had to change "CustomDetailsCell.UpdateInfo"'s "If Not subscribed Then" to "If Not subscribed And Me.TabStripElement IsNot Nothing Then" or I would get an "Object reference not set to an instance of an object" error upon expanding a 3rd (0-based) / 4th (1-based) ChildGridViewTemplate.

    Re. 3: My fix to your workaround in #5 above also appears to have fixed the error upon Down key into an empty Tab.

  8. Jack
    Admin
    Jack avatar
    2333 posts

    Posted 19 Nov 2009 Link to this post

    Hello Tom, I am glad to hear that you have found a solution. We will try to solve the issue in our upcoming service pack.

    Greetings,
    Jack
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
UI for WinForms is Visual Studio 2017 Ready