RadTabstrip and RadMultiPage: Problem with RadTabStrip.SelectedIndex

1 Answer 664 Views
General Discussions
Neil
Top achievements
Rank 1
Neil asked on 07 Oct 2021, 08:12 PM

Hi,

   I have a RadTapStrip and a RadmultiPage: The code is below though I have cut off the RadMultiPage for brevity.

    In The code behind which I've left out, again for brevity,In each pageview there is a RadHTMLChart. I read an article that said that all pageviews are loaded automatically unless they are set to Select Only.

 The code makes certain tabs invisible under certain circumstances. In this case the first tab is made invisible. so the second tab shows up first. To make sure that the second tab is selected and the associated RadHTMLChart shows up I set the Selectedindex for the RadTabStrip to 1.

RadTabStrip1.SelectedIndex = 1;

I wasn't sure if that was right but I did see that the second tab is highlighted  as I hoped when the screen renders; just to be clear this "second" tab is the first tab after the real first  tab is  made invisible . However the RadHTMLChart associated with that tab does not show up. 

 I clicked the next tab and the associated RadHtmlChart DID appear for that tab. Then when I went back to click the previous tab that didn't show the radHTMLChart when the screen was FIRST rendered; this time the radHTMLchart DID show up.

 

To do research I put a line in the  codebehind to explicitly activate the RadHTMLChart when the screen FIRST renders,

RadMultiPage1.FindPageViewByID("RadPageView2").Selected = true;

This time when the screen first rendered it DID show the associated radHTMLChart.

 I believe I'm missing something in the odd situation where tabs are made invisible.

The code from the aspx file is  below:

-------------------------------------------------------------------------------------------

 

 

         <telerik:RadTabStrip runat="server" ID="RadTabStrip1" MultiPageID="RadMultiPage1" SelectedIndex="0" Skin="Simple" Visible="false">

                <Tabs>

                    <telerik:RadTab Text="One" Width="200px"></telerik:RadTab>

                    <telerik:RadTab Text="Two" Width="200px"></telerik:RadTab>

                    <telerik:RadTab Text="Three" Width="200px"></telerik:RadTab>

                    <telerik:RadTab Text="Four" Width="200px"></telerik:RadTab>

                    <telerik:RadTab Text="Five" Width="200px"></telerik:RadTab>

                    <telerik:RadTab Text="Six" Width="200px"></telerik:RadTab>

                    <telerik:RadTab Text="Seven" Width="200px"></telerik:RadTab>

                    <telerik:RadTab Text="Eight" Width="200px"></telerik:RadTab>

                    <telerik:RadTab Text="Nine" Width="200px"></telerik:RadTab>

                    <telerik:RadTab Text="Ten" Width="200px"></telerik:RadTab>

                    <telerik:RadTab Text="Eleven" Width="200px"></telerik:RadTab>

                </Tabs>

            </telerik:RadTabStrip><br />

           

            <telerik:RadMultiPage runat="server" id="RadMultiPage1" SelectedIndex="0">

                <telerik:RadPageView runat="server" ID="RadPageView1">

                    <div>

                        <telerik:RadHtmlChart runat="server" Width="100%" Height="800px" ID="ChartInsideDiameter" Skin="Metro" PlotArea-XAxis-MinorGridLines-Visible="false"

                            PlotArea-XAxis-MajorGridLines-Visible="false" PlotArea-YAxis-MajorGridLines-Visible="false" PlotArea-YAxis-MinorGridLines-Visible="false">

                            <PlotArea>

                                <Series>

                                    <telerik:LineSeries DataFieldY="Field1" Name="">

                                        <TooltipsAppearance Color="White" />

                                    </telerik:LineSeries>

                                </Series>

                                <XAxis DataLabelsField="Label1">

                                    <LabelsAppearance RotationAngle="75">

                                    </LabelsAppearance>

                                    <TitleAppearance Text="Date">

                                    </TitleAppearance>

                                </XAxis>

                                <YAxis Step=".15">

                                    <TitleAppearance Text="Title1">

                                    </TitleAppearance>

                                </YAxis>

                            </PlotArea>

                            <Legend>

                                <Appearance>

                                </Appearance>

                            </Legend>

                            <ChartTitle>

                            </ChartTitle>

                        </telerik:RadHtmlChart>

                    </div>

                </telerik:RadPageView>

                <telerik:RadPageView runat="server" ID="RadPageView2">

                    <div>

                        <telerik:RadHtmlChart runat="server" Width="100%" Height="800px" ID="ChartInsideDiameterA" Skin="Metro" PlotArea-XAxis-MinorGridLines-Visible="false"

                            PlotArea-XAxis-MajorGridLines-Visible="false" PlotArea-YAxis-MajorGridLines-Visible="false" PlotArea-YAxis-MinorGridLines-Visible="false">

                            <PlotArea>

                                <Series>

                                    <telerik:LineSeries DataFieldY="Field2" Name="">

                                        <TooltipsAppearance Color="White" />

                                    </telerik:LineSeries>

                                </Series>

                                <XAxis DataLabelsField="Label2">

                                    <LabelsAppearance RotationAngle="75">

                                    </LabelsAppearance>

                                    <TitleAppearance Text="Date">

                                    </TitleAppearance>

                                </XAxis>

                                <YAxis Step=".2">

                                    <TitleAppearance Text="Title2">

                                    </TitleAppearance>

                                </YAxis>

                            </PlotArea>

                            <Legend>

                                <Appearance>

                                </Appearance>

                            </Legend>

                            <ChartTitle>

                            </ChartTitle>

                        </telerik:RadHtmlChart>

                    </div>                    

                </telerik:RadPageView>

 

1 Answer, 1 is accepted

Sort by
0
Vessy
Telerik team
answered on 11 Oct 2021, 02:42 PM

Hello Neil,

I have just answered your support ticket on the matter, for convenience I will copy my answer here as well:

 

RadMultiPage associates its Pageviews with Tabstrip, but its functionality is not constrained by that. The control allows you to set different selected index for both controls, thus when the first tab is not visible, the first pageview can still be set as active if the SelectedIndex is set to "0". 

In order to avoid that you can chose between one of the following options:

  • Make the first view not visible along with the first tab.
  • Change the selected index of RadMultiPage to "1", so it will skip the first PageView (like already found by you).

 

Regards,
Vessy
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Neil
Top achievements
Rank 1
commented on 12 Oct 2021, 01:19 PM

Vessey,

 

   Thanks for your response. I will clarify that I created a second version of the post because the version in the forums is (or should be) handled by the community and  not necessarily the technicians (like you). I got no answer on the forum question so I realized that  maybe it should be handled as a ticket.

 

I tested as far as I could your suggestion (I think that’s what you mean) that both the index for the radTabStrip and the index for the MultiPageView can be set to the same thing. That seems to work but I did not see this in any of the posts (there were many) I checked when researching this on the internet; there are weak spots in some of your documentation as I’ve found a  number of times in the past. To be honest this connection beween radtabstrip and multipageview  is not really intuitive and should have been controlled natively by the hierarchically higher control, the radtabstrip. My first look  at this relationship between the two was confusing. If there is only one pageview for each tabstrip then why should they have  to be synched up seperately in terms of selected index. This is where the confusion is for me.

Again, thank you. I am going through the report and testing just in case we have a  missing tab that isn't first or second on the screen. I'm not sure how that will work. This is all things I have to work through by testing since I'm not sure how it works in all  cases.

 

Neil 

I will make sure this works as described but I appreciate your help. Thanks,

Neil

Vessy
Telerik team
commented on 15 Oct 2021, 12:48 PM

Hi Neil,

Your assumption is absolutely correct - the primary support tickets are reviewed with the highest priority and if you need to receive a response faster (and if your license covers it), you should submit a ticket.

As for the documentation - I appreciate your feedback and will review the related articles where this information could be added (updated).

In addition, I would like to encourage you to submit any improvement suggestions you have for the controls in our Feedback portal here:
https://feedback.telerik.com/aspnet-ajax

Neil
Top achievements
Rank 1
commented on 15 Oct 2021, 10:23 PM

Thank you. To be honest there is sometimes some gaps in the documentation and some of the design is a bit confusing. However this is the first time that I've been encouraged to bring these issues to your attention. In the past I sort of felt that I was lost at sea with no help. I feel that being able to comment about problems changes my experience with telerik and removes some of the sense of frustration I have felt in the past. This is an excellent idea and I appreciate it
Vessy
Telerik team
commented on 20 Oct 2021, 03:15 PM

Hi Neil,

I am not sure why you have been under such impression but I am really happy that this concern is not valid anymore. We really value the feedback of our customers and review it regularly (there is a feedback form on the bottom of each help article). In addition, you can propose your own changes/updates/additions in our documentation directly in its github repo here:

 

Neil
Top achievements
Rank 1
commented on 21 Oct 2021, 02:02 AM

To be honest up until about a year ago it was a practice for your people to direct me to rather basic documentation for a general topic, , even when the issue was, like in this case, not addressed by basic documentation. There wasn't any talk of improving the documentation. In many cases it's all there was. This  is very different and  welcome.
Vessy
Telerik team
commented on 22 Oct 2021, 03:35 PM

Hi Neil,

Thank you for the clarification. Indeed most of our articles cover the basic and most common resources and sometimes the client needs to combine them in order to achieve a more complex scenario. Still, we do our best to improve them and upload KBs with more complex solutions, whenever it is possible. Once again, thank you so mush for the shared feedback!

We stay at your disposal whenever any further issue with the controls occur.

Tags
General Discussions
Asked by
Neil
Top achievements
Rank 1
Answers by
Vessy
Telerik team
Share this question
or