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

Dynamic Docks loaded on tab change

6 Answers 142 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Fazeli
Top achievements
Rank 1
Fazeli asked on 27 May 2008, 04:55 PM
I have a related thread in the General Discussion forum, but this is a more specific problem:

When you modify the My Portal demo to create a dynamic dock + user control upon the changing of a tab (rather than upon a button click), the tabs no longer function correctly from a UI standpoint. Clicking the tabs does fire the right trigger and cause the creation of a dock+user control. However, the tabs don't change (the default tab is always shown), and the associated PageViews don't change either (the default pageview is always shown). Here is the hidden DIV code from the demo, modified for a tab strip:

            <div class="hidden"
                <!-- Hidden UpdatePanel, which is used to receive the new dock controls. 
                     We move the new dock controls to the desired initial dock zone using script. --> 
                <asp:UpdatePanel runat="server" ID="updatePanel"
                    <Triggers> 
                        <asp:AsyncPostBackTrigger ControlID="mainTabStrip" EventName="TabClick" /> 
                    </Triggers> 
                </asp:UpdatePanel> 
            </div> 

I suspect that the asynchronous postback trigger is causing the issue. Any ideas on how to fix the problem?

6 Answers, 1 is accepted

Sort by
0
Sophy
Telerik team
answered on 28 May 2008, 10:16 AM
Hello Fazeli,

The problem you experience is due to RadTabStrip not being updated when being clicked as it is a trigger to the invisible UpdatePanel and only its content is updated. To solve the problem I suggest you simply add the RadTabStrip and the corresponding RadMultiPage in another UpdatePanel. For your convenience I have prepared a sample page demonstrating the scenario you describe. Please, find it attached and let me know in case you need further assistance.

All the best,
Sophy
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
AECLDEV
Top achievements
Rank 1
answered on 28 May 2008, 02:19 PM
Hello,

Thank you for this package, but when I add these two files to a new AJAX-enabled Web Application (and add the appropriate references) I get an "Invalid Argument" error when changing tabs.

Furthermore, whenever I try to add an MS Reportviewer with a report to the dock (in a usercontrol OR directly to the Controls collection), I am deluged with "Expected ';'" errors.  This is critical as our Dashboards run on MS reports, and we need to be able to put them in Dynamically Created Docks.

We are able to do this with the Classic ASP.NET Telerik Controls, but have never been able to with the AJAX variety.

Can you help?

Thanks
Greg
0
Sophy
Telerik team
answered on 28 May 2008, 03:53 PM
Hello Greg,

I am not sure what may be the reason for experiencing the problem you mention. I tried to create a new AJAX-enabled Web Site and add the previously attached files using .NET 2.0 and .NET 3.5 and was not able to reproduce any problems in both cases. For your convenience, now I am attaching an AJAX-enabled Web Site containing the same test page. You need to simply open it in VS as an existing WebSite. In case you still experience problems, please, send us more details about the error you receive and its stack trace. If it is possible open a support ticket and send us your WebSite so that we can test it on our side. We will be glad to help you.
  
All the best,
Sophy
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
AECLDEV
Top achievements
Rank 1
answered on 28 May 2008, 05:41 PM
Hi Sophy,

I still get the error, it is in relation to the OriginalZIndex call in the scriptresource.axd.  thats is all I can see about it.

Still, the greater issue is the fact that AJAX dock doesnt seem to work with ms reporting.  has Telerik tested this?
0
brad
Top achievements
Rank 1
answered on 29 May 2008, 03:29 AM
Great example app, thanks for putting this together Sophy.

Worked first go for me by including the two files to an existing project.

The example creates a new dock and adds it to a dockZone when clicking one of the tabs. To take this a step further, how would you go about displaying one set of docks when you click a tab and then closing and opening a new set of docks when another tab is clicked (similar to igoogle/pageflakes/dropthings)? Creating and displaying the set of docks is no problem, it's knowing when and how to remove the old set that I haven't been able to work out.

The problem as far as I can tell lies with having to create the dock in page_init. At this point how can you tell that a new tab has been clicked so you can load a different set of docks instead of those stored in dockState?

Or am I thinking along the wrong path and there is a better way to do this?

Thanks.
0
Sophy
Telerik team
answered on 03 Jun 2008, 12:55 PM
Hi Brad,

It is too early to find the selected tab index at Page_Init. That is why, my suggestion is to recreate all docks at Page_Init and when clicking on a tab simply switch the corresponding views so that only the docks in this view will be visible and all other docks will be invisible.  Please, take a look at the attached example and let me know in case you need further assistance.

All the best,
Sophy
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Dock
Asked by
Fazeli
Top achievements
Rank 1
Answers by
Sophy
Telerik team
AECLDEV
Top achievements
Rank 1
brad
Top achievements
Rank 1
Share this question
or