I have a RadTabStrip paired with a RadMultiPage. The RadPageViews are created dynamically in the OnDataBinding event of the RadTabStrip. Everything is working fine except when the tabs have spaces (or other special characters) in their titles. When I click on those particular tabs, I examined the rendered html for the RadMultiPage -- what happens is that the "class=rmpHiddenView" is not removed from the div representing the page view (at this point the other tabs have this CSS class applied plus the inline style "display:none"). When I click on the tabs without spaces in their names, everything works -- that class is removed (and the inline style "display:none" is also removed).
This is the markup:
Here is what the rendered html looks like after I click on the third tab:
Note that in this picture, I'm URL encoding the id of the RADPageView when I set it in my codebehind, but I get the same result when I don't URL encode it.
9 Answers, 1 is accepted
Even if I substitute my own script to "select" the page, I get the same results (it works except for tabs that have spaces in their title). Suggesting, perhaps that the problem is with the RadMultiPage "set_selected" script itself, perhaps?
Here is the code I used for selection, to be specific:
Could you specify the exact version of the controls that you are using? Also please provide the server-side code that you are using to add pageview so I could try to reproduce the problem locally,
the Telerik team
I found that the problem has something to do with how I was assigning the IDs. Once I removed the codebehind that was setting the IDs on the tabs and pages, it worked.
This code worked on the older version of Telerik;
tabName contained spaces for some tabs and these wouldn't display their contents
using below corrected the display issue;
I've made a very simple page trying to reproduce the experienced behavior, but to no avail. The version I'm using is 2011.3.1305. Pleas find it attached so you could test it on your side.
the Telerik team
I downloaded Telerik controls yesterday to try them out and I found the exact same thing.
It took me quite a long time to figure out this was the problem. For testing/reproduction purposes, I removed the spaces from any tab names (Changed "Tab 1" to "Tab1") and it worked perfectly. Thats how I figured out it was the spaces causing the problems. (If I add a space to a previously working tab name, it then fails as well)
Thankfully someone posted a work around.
In case you want to replace all special characters by any other string, use this:
pageViewId = Regex.Replace(pageViewId, "[^a-zA-Z0-9 ]", StringToBeTheTransformatioin);
I just recently had the exact same problem, and to fix it, I set the RadPageView.Selected = true; associated with the RadTab that was selected also in my C# Codebehind.
RadTab RadTab1 = RadTabStrip1.Tabs.FindTabByValue("RadTab1Value");
RadTab1.Selected = true;
RadPageView1.Selected = true;
That got rid of the rmpHiddenView CSSClass associated with the hidden content.
This does not sound like the previously discussed issue related to having empty spaces and special characters in the Tab's Text and PageView's ID. The rmpHiddenView class is set to all PageViews that are not selected and therefor not visible. So if you have 5 PageView's associated with 5 tabs only the selected PageView out of the 5 will not have this class set. As you have noticed the Tab selection and the PageView selection are separate so you can have a PageView different from the one associated with the Tab selected from code-behind.