I have a TabStrip that is connected to a MultiPage. When using the UI, these two items are synched up correctly.
I use the tabs in a pseudo-wizard type application. When my app starts, all the tabs but the first one are disabled. There is a button on the first tab (multipage actually) that when pressed, "starts" the process, and clicking it should enable all the other tabs, and move you to the second tab in the process to begin the data entry.
Here is my basic setup (partially removed items to condense code)
And here is the code behind:
Most of this works. The image is added to the first tab, all the tabs are enabled, and the Patient Information tab is selected.
But what does NOT work is that the matching PageView is NOT selected. It still displays the PageView of the first tab.
What am I doing wrong?
I use the tabs in a pseudo-wizard type application. When my app starts, all the tabs but the first one are disabled. There is a button on the first tab (multipage actually) that when pressed, "starts" the process, and clicking it should enable all the other tabs, and move you to the second tab in the process to begin the data entry.
Here is my basic setup (partially removed items to condense code)
<
telerik:RadTabStrip
ID
=
"RadTabStrip1"
runat
=
"server"
Skin
=
"Telerik"
MultiPageID
=
"RadMultiPage1"
>
<
Tabs
>
<
telerik:RadTab
runat
=
"server"
Text
=
"Order Setup"
Value
=
"OrderSetup"
PageViewID
=
"rpvOrderSetup"
Selected
=
"true"
/>
<
telerik:RadTab
runat
=
"server"
Text
=
"Patient Information"
Value
=
"PatientInformation"
PageViewID
=
"rpvPatientInformation"
Enabled
=
"false"
/>
<
telerik:RadTab
runat
=
"server"
Text
=
"Order Information"
Value
=
"OrderInformation"
PageViewID
=
"rpvOrderInformation"
Enabled
=
"false"
/>
</
Tabs
>
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
ID
=
"RadMultiPage1"
runat
=
"server"
>
<
telerik:RadPageView
ID
=
"rpvOrderSetup"
runat
=
"server"
Selected
=
"true"
>
<
hr
style
=
"margin: 0px; padding: 0px; width: 100%;"
/>
<
local:OrderSetup
runat
=
"server"
ID
=
"OrderSetup"
/>
</
telerik:RadPageView
>
<
telerik:RadPageView
ID
=
"rpvPatientInformation"
runat
=
"server"
>
<
hr
style
=
"margin: 0px; padding: 0px; width: 100%;"
/>
<
local:PatientInformation
runat
=
"server"
ID
=
"PatientInformation"
/>
</
telerik:RadPageView
>
<
telerik:RadPageView
ID
=
"rpvOrderInformation"
runat
=
"server"
>
<
hr
style
=
"margin: 0px; padding: 0px; width: 100%;"
/>
<
local:OrderInformation
runat
=
"server"
ID
=
"OrderInformation"
/>
</
telerik:RadPageView
>
</
telerik:RadMultiPage
>
And here is the code behind:
void
OrderSetup_Click(EventArgs e)
{
RadTabStrip1.FindTabByValue(
"OrderSetup"
).ImageUrl =
"~/images/Ok.png"
;
IList<RadTab> tabs = RadTabStrip1.GetAllTabs();
foreach
(RadTab tab
in
tabs) tab.Enabled =
true
;
RadTabStrip1.FindTabByValue(
"PatientInformation"
).Selected =
true
;
RadMultiPage1.FindPageViewByID(
"rpvPatientInformation"
).Selected =
true
;
// RadMultiPage1.SelectedIndex = RadMultiPage1.FindPageViewByID("rpvPatientInformation").Index;
// rpvPatientInformation.Selected = true;
// RadMultiPage1.SelectedIndex = 1;
// RadMultiPage1.SelectedIndex = 1;
}
Most of this works. The image is added to the first tab, all the tabs are enabled, and the Patient Information tab is selected.
But what does NOT work is that the matching PageView is NOT selected. It still displays the PageView of the first tab.
What am I doing wrong?