Naming Tabbed Childview in Hierarchical Gridview

7 posts, 1 answers
  1. MO
    MO avatar
    23 posts
    Member since:
    Jul 2012

    Posted 18 Sep 2013 Link to this post

    I have a gridview with two relations, and I really like how it puts the childrows of the two relations in the childview into two tabs. However, each of the tabs is named "table". How do I change the text on those tabs? I'm using VB .NET, version 4 or 4.5

    Preferably, I'd like to do this outside of the viewcellformatting event. Is it possible to get to this through the gridview object itself

    I can programmatically set IsExpanded, but how do I then tell it which tab to open at the same time?

    Thanks!
  2. MO
    MO avatar
    23 posts
    Member since:
    Jul 2012

    Posted 19 Sep 2013 Link to this post

    Ok I found the page about changing the names of the tabs through celldetail.pageviewelement.items

    However, I'm trying to have it select which pageview to view. I'm doing this through the viewcellformatting handling method. I've tried using the .select() method (see below), and I've tried using the .focus() method. I've also tried using .IsSelected = true.

    But none of those work. So how does one programmatically activate the specific pageviewelement so it will be displayed?

    Private
     Sub rgvVendorList_ViewCellFormatting(ByVal sender As Object
                    ByVal e As Telerik.WinControls.UI.CellFormattingEventArgsHandles rgvVendorList.ViewCellFormatting
        Dim cellDetail As Telerik.WinControls.UI.GridDetailViewCellElement = TryCast(e.CellElement, Telerik.WinControls.UI.GridDetailViewCellElement)

        If
     cellDetail IsNot Nothing Then
            cellDetail.ChildTableElement.StretchHorizontally = False
            e.CellElement.Padding = New Padding(0)
            e.CellElement.BorderWidth = 1
            
            If
     Me.rgvVendorList.CurrentCell.ColumnInfo.Name = "InstList" Then
                cellDetail.PageViewElement.Items(0).Select()   
            Else If Me.rgvVendorList.CurrentCell.ColumnInfo.Name = "SystemList" Then
                cellDetail.PageViewElement.Items(1).Select()
            End If
        End If

        RemovePlusMinusSymbol(e.CellElement)
    End Sub
  3. Answer
    Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3945 posts

    Posted 23 Sep 2013 Link to this post

    Hello Matt,

    Thank you for contacting Telerik Support.

    Please, find the attached sample project, demonstrating how to obtain a certain child template selected as well as setting caption to each child view.

    I hope this information helps. Should you have further questions, I would be glad to help.

    Regards,
    Desislava
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    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 >>
  4. MO
    MO avatar
    23 posts
    Member since:
    Jul 2012

    Posted 23 Sep 2013 Link to this post

    Thank you for the example... so let me see if I'm understanding this correctly:

    RadPageViewStripElement is the pageview which contains the tabs and childgrid in it?

    And what exactly does "hierarchyRow.Views(0).Rows.Count = 0" refer to? Is that the first of the childgridviews? So each additional tabbed gridview will be an increment of the views?

    And do you have an object definition online that includes all of these object relationships? I'm just not finding it...

    Thanks!



  5. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3945 posts

    Posted 26 Sep 2013 Link to this post

    Hello Matt,

    Thank you for writing back.

    RadPageViewStripElement holds both of the tabs (RadPageViewItems) in my example.

    The code snippet: 
    hierarchyRow.Views(0).Rows.Count = 0
    is referred just to a condition in the example to change the selected tab if the first child view has no rows. Each view in hierarchyRow.Views displays the certain child view of the current level. Every additional tabbed gridview should increment view index. You can find more information about RadPageView in Strip view mode in the corresponding help article, but the exact class hierarchy is currently not available in our documentation. We will consider it in future documentation updates.

    I hope this information helps. Should you have further questions, I would be glad to help.

    Regards,
    Desislava
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    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. MO
    MO avatar
    23 posts
    Member since:
    Jul 2012

    Posted 27 Sep 2013 Link to this post

    That would be really nice, thank you.

    I was hoping you had a document similar to Microsoft's MSDN library documentation (example: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.aspx ). Have I just not been able to find it?

    If you don't have a resource like that, I'd vote for it. It would have solved most of my questions!

    Thank you for you help.
  7. Dess | Tech Support Engineer, Sr.
    Admin
    Dess | Tech Support Engineer, Sr.  avatar
    3945 posts

    Posted 02 Oct 2013 Link to this post

    Hello Matt,

    Thank you for writing back.

    We have similar API documentation about RadGridView. As to the question about the tab pages, I think that RadPageView API reference will be useful.

    I hope this information helps. Should you have further questions, I would be glad to help.

    Regards,
    Desislava
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    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 >>
Back to Top