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

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

1 Answer 40 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Khoa
Top achievements
Rank 1
Khoa asked on 12 Dec 2018, 10:12 AM
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}" />
                            </ScrollViewer>
                        </telerik:RadPane>
                        <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}"/>
                            </ScrollViewer>
                        </telerik:RadPane>
                    </telerik:RadPaneGroup>

1 Answer, 1 is accepted

Sort by
0
Vladimir Stoyanov
Telerik team
answered on 14 Dec 2018, 04:19 PM
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.

Regards,
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.
Tags
TabControl
Asked by
Khoa
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
Share this question
or