Radsplitcontainer, radpanegroup and radpane , how can I set correct radpane tab active ?

2 posts, 0 answers
  1. Khoa
    Khoa avatar
    25 posts
    Member since:
    Sep 2018

    Posted 12 Dec 2018 Link to this post

    Hi, I'm currently using Radsplitcontainer, radpanegroup and radpane and I'm having a problem with settings which of the tab in the radpanegroup should be active. I got two viewmodels, and I want to use a bool to make the tabs active according to which ViewModel event that is invoking. How can I do this?

    Because I'm using a gridView, and by selecting an item in the grid, I the tab to be active depending on which gridview I'm selecting an item on. This mean that I'll have 2 gridviews, and the radpane is supposed to be a tab window that shows the details of the item selected.

    <telerik:RadPaneGroup TabStripPlacement="Top" telerik:ProportionalStackPanel.RelativeSize="100,300" >
                            <telerik:RadPane Header="{Binding viewModel1.Title, Mode=TwoWay}" CanUserClose="False" CanDockInDocumentHost="True" >
                                <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                                    <ContentControl Content="{Binding viewModel1}"
        ContentTemplate="{StaticResource ViewEditorTemplate1}" />
                            <telerik:RadPane Header="{Binding viewModel2.Title}" CanUserClose="False" CanDockInDocumentHost="True" telerik:ProportionalStackPanel.RelativeSize="200, 100" >
                                <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                                    <ContentControl Content="{Binding viewModel2}"
                                                    ContentTemplate="{StaticResource ViewEditorTemplate1}"/>
  2. Vladimir Stoyanov
    Vladimir Stoyanov avatar
    638 posts

    Posted 14 Dec 2018 Link to this post

    Hello Khoa,

    Thank you for the provided code snippet.

    Although I am not aware of the exact setup on your end, in order to use a boolean property to make a pane active, you can bind this property to the IsActive property of the RadPane. You can also check out the RadPane Activation article in our documentation, if you have not done so already.

    Hope this helps.

    Vladimir Stoyanov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top