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

Help with Portal Site

43 Answers 980 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Jon Hobbs
Top achievements
Rank 1
Jon Hobbs asked on 28 Apr 2007, 11:19 PM
Hi Guys,

I am using Rad Dock Prometheus for the first time and I have an ambitious project.

I want to build a home page which initially loads lots of "widgets"  into a certain layout, allow the user to move them around, save their layout to a database and add new widgets by clicking an add button.

The problem is that I don't know where to start. I have got several Widgets containing user controls and managed to put them into three docking zones. I can move them around on the page but don't know how to do the following....

* Save the layout to a SQL server database.
* Reload the layout when the user logs back on if they have a layout saved.
* Allow them to add new docks which are initially hidden

I have looked at the myportal example in the documentation but haven't managed to get the "save layout to session" code working at all. Does anyone know of a good article on how to make a portal like this ?

If you need any example of how it needs to work you can see what I mean on http://gamers.eurogamer.net/.

Thanks, Jon

43 Answers, 1 is accepted

Sort by
0
Jon Hobbs
Top achievements
Rank 1
answered on 03 May 2007, 07:39 PM
Anybody else tried to do this yet ?
0
Petya
Telerik team
answered on 10 May 2007, 04:28 PM
Hello Jon Hobbs,

Please, test the attached project with the updated version of the control which you can find here. This is a trial version - if you want the developer's version, please open a support ticket and we will send it to you.

All the best,
Petya
the telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jon Hobbs
Top achievements
Rank 1
answered on 18 May 2007, 11:23 AM
Hi Petya,

Thanks for that, I will give it a try and let you know how I get on :)

Jon
0
gil_yoktan
Top achievements
Rank 1
answered on 22 May 2007, 08:27 AM
Hello  As I'm interested to see this example, I downloaded the ZIP file and checked it out
I didn't find the MyPortalDB specified in the web.config:
<add name="MyPortalDBConnectionString1" connectionString="Data Source=TATEVA\SQLEXPRESS;Initial Catalog=MyPortalDB;Integrated Security=True"   providerName="System.Data.SqlClient" />

Maybe there is something I didn't understand...
Thanks in advance
Gil Yoktan
0
Petya
Telerik team
answered on 22 May 2007, 09:49 AM
Hi,

I truly apologize, I guess I missed adding the database to the .zip I sent you. Please, find attached the MyPortalDB database.

All the best,
Petya
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
mikejoseph
Top achievements
Rank 1
answered on 23 May 2007, 06:17 PM

Here's my VB.NET translation if it saves anyone some time...

Imports System.Collections  
Imports System.Collections.Generic  
Imports Telerik.Web.UI  
 
Partial Class Portal  
    Inherits BasePage  
 
    Private _state As String 
 
    Private Property CurrentDockStates() As List(Of DockState)  
        Get 
            Dim _currentDockStates As New List(Of DockState)  
            Dim state As String = CustomerDataset.CustomerDataTable.GetPortalState(CustomerSession.CustomerId)  
            Dim dockState As DockState  
 
            If state = "" Then 
                Return _currentDockStates  
            Else 
                Dim dockStates As String() = state.Split("|")  
 
                For i As Integer = 0 To dockStates.Length - 1  
                    If Not String.IsNullOrEmpty(dockStates(i)) Then 
                        dockState = dockState.Deserialize(dockStates(i))  
                        _currentDockStates.Add(dockState)  
                    End If 
                Next 
 
                Return _currentDockStates  
            End If 
        End Get 
        Set(ByVal value As List(Of DockState))  
            Dim sb As New StringBuilder  
            For i As Integer = 0 To value.Count - 1  
                Dim serializedState As String = String.Concat(value(i).ToString, "|")  
                sb.Append(serializedState).ToString()   ' I don't think the ToString is necessary, but the sample included it so....  
            Next 
 
            CustomerDataset.CustomerDataTable.SavePortalState(CustomerSession.CustomerId, sb.ToString)  
        End Set 
    End Property 
 
    Private Function CreateRadDockFromState(ByVal state As DockState, ByVal number As Integer)  
        Dim dock As New RadDock  
        dock.ID = String.Concat("RadDock", number)  
        dock.ApplyState(state)  
        dock.Visible = (Not state.Closed)  
        Return dock  
    End Function 
 
    Private Function CreateRadDock() As RadDock  
        Dim docksCount As Integer = Me.CurrentDockStates.Count  
        Dim dock As New RadDock  
        With dock  
            .ID = String.Concat("RadDock", docksCount)  
            .Title = String.Concat("Dock ", docksCount)  
            .Text = String.Concat("Added at "Date.Now)  
            .UniqueName = Guid.NewGuid.ToString  
            .Width = Unit.Pixel(300)  
        End With 
 
        Return dock  
    End Function 
 
    Private Sub CreateSaveStateTriggers(ByVal dock As RadDock)  
        'Ensure that the RadDock control will initiate postback  
        ' when its position changes on the client. Using the  
        ' trigger we will "ajaxify" that postback.  
        dock.AutoPostBack = True 
        dock.CommandsAutoPostBack = True 
 
        Dim saveStateTrigger As New AsyncPostBackTrigger  
        saveStateTrigger.ControlID = dock.ID  
        saveStateTrigger.EventName = "DockPositionChanged" 
        Me.UpdatePanel1.Triggers.Add(saveStateTrigger)  
 
        saveStateTrigger = New AsyncPostBackTrigger  
        saveStateTrigger.ControlID = dock.ID  
        saveStateTrigger.EventName = "Command" 
        Me.UpdatePanel1.Triggers.Add(saveStateTrigger)  
    End Sub 
 
    Private Sub LoadWidget(ByVal dock As RadDock)  
        If String.IsNullOrEmpty(dock.Tag) Then Exit Sub 
        Dim widget As Control = LoadControl(dock.Tag)  
        dock.ContentContainer.Controls.Add(widget)  
    End Sub 
 
    Protected Sub RadDockLayout1_LoadDockLayout(ByVal sender As ObjectByVal e As Telerik.Web.UI.DockLayoutEventArgs) Handles RadDockLayout1.LoadDockLayout  
        ' Populate the event args with the state information. The RadDockLayout control  
        ' will automatically move the docks according that information.  
        For Each state As DockState In Me.CurrentDockStates  
            e.Positions(state.UniqueName) = state.DockZoneID  
            e.Indices(state.UniqueName) = state.Index  
        Next 
    End Sub 
 
    Protected Sub RadDockLayout1_SaveDockLayout(ByVal sender As ObjectByVal e As Telerik.Web.UI.DockLayoutEventArgs) Handles RadDockLayout1.SaveDockLayout  
        'Save the dock state in the session. This will enable us  
        ' to recreate the dock in the next Page_Init.  
        Me.CurrentDockStates = RadDockLayout1.GetRegisteredDocksState()  
    End Sub 
 
    Protected Sub ButtonAddDock_Click(ByVal sender As ObjectByVal e As System.EventArgs) Handles ButtonAddDock.Click  
        Dim dock As RadDock = Me.CreateRadDock  
 
        'In order to optimize the execution speed we are adding the dock to a  
        ' hidden update panel and then register a script which will move it  
        ' to RadDockZone1 after the AJAX request completes. If you want to  
        ' dock the control in other zone, modify the script according your needs.  
        UpdatePanel1.ContentTemplateContainer.Controls.Add(Dock)  
 
        ScriptManager.RegisterStartupScript(Me.UpdatePanel1, dock.GetType"DockIntoZone", _  
                    Me.getStartupScript(dock.ClientID, Me.DropDownZone.SelectedValue), True)  
              
        'Right now the RadDock control is not docked. When we try to save its state  
        ' later, the DockZoneID will be empty. To workaround this problem we will  
        ' set the AutoPostBack property of the RadDock control to true and will  
        ' attach an AsyncPostBackTrigger for the DockPositionChanged client-side  
        ' event. This will initiate second AJAX request in order to save the state  
        ' AFTER the dock was docked in RadDockZone1.  
        CreateSaveStateTriggers(Dock)  
 
        'Load the selected widget in the RadDock control  
        Dock.Tag = DroptDownWidget.SelectedValue  
        LoadWidget(Dock)  
    End Sub 
 
    Private Function getStartupScript(ByVal clientId As StringByVal drowpDownZone As StringAs String 
        Dim sb As New StringBuilder  
        sb.AppendLine("Sys.Application.add_load(function () {{")  
        sb.AppendFormat("   if (typeof(Telerik.Dock{0}) === 'undefined')", clientId).AppendLine()  
        sb.AppendLine("   {{")  
        sb.AppendFormat("      $find('{1}').dock($find('{0}'));", clientId, drowpDownZone).AppendLine()  
        sb.AppendFormat("      Telerik.Dock{0}Moved = true;").AppendLine()  
        sb.AppendLine("   }}")  
        Return sb.ToString  
    End Function 
 
    Protected Sub Page_Init(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Init  
        ' Recreate the docks in order to ensure their proper operation  
        For i As Integer = 0 To Me.CurrentDockStates.Count - 1  
            Dim dock As RadDock = Me.CreateRadDockFromState(Me.CurrentDockStates(i), i)  
            'We will just add the RadDock control to the RadDockLayout.  
            ' You could use any other control for that purpose, just ensure  
            ' that it is inside the RadDockLayout control.  
            ' The RadDockLayout control will automatically move the RadDock  
            ' controls to their corresponding zone in the LoadDockLayout  
            ' event (see below).  
            RadDockLayout1.Controls.Add(dock)  
            'We want to save the dock state every time a dock is moved.  
            CreateSaveStateTriggers(dock)  
            'Load the selected widget  
            LoadWidget(dock)  
        Next 
    End Sub 
End Class 
 

Thanks,

Mike Joseph
Interapp Development, Inc.
0
Aron Calder
Top achievements
Rank 1
answered on 23 May 2007, 10:39 PM

Hi Telerik,

With this example, how can I clear the dockstate of docks that have been closed?

Over time as a user adds and removes docks the state will fill up with docks that have their closed property=true.

I tried to remove closed docks from the state collection (CurrentDockStates) in the SaveLayout and in the the LoadLayout, I even tried to do it during the CreateRadDockFromState. Although it is possible to remove the dock, it messes up the page calls and the page will no longer work and you can't add anymore docks again.

Do you have any suggestions on how best to "tidy up" closed docks?

Many thanks

Aron

 

0
Tim
Top achievements
Rank 1
answered on 23 May 2007, 10:56 PM
Thanks for the example but what it is missing is how to save the preferences for each control. I.e. if the custom control is an RSS reader how do i pass in the feed i want it to read or the id so the control can look up the preferences in the database?

Thanks.

Tim
0
Aron Calder
Top achievements
Rank 1
answered on 23 May 2007, 11:48 PM
Tim,

I tackled this by creating a new "WidgetInstance" class for all my state storage. It held the state of the RadDock and the state of the usercontrol.

This is pulled from the db as a collection of WidgetInstances and each one is then added to the dock layout during the CreateRadDockFromState method.

When the usercontrol is loaded I just pass it's state stored in the WidgetInstance class and it recreates itself with all it's preferences.

Hope this helps.

Cheers

Aron

0
Valeri Hristov
Telerik team
answered on 24 May 2007, 07:22 AM
Hi Aron,

The latest update of RadDock, version 2007.1.521.0, has certain modifications, affecting the Closed state of the RadDock controls. The first is that each RadDock control has Closed property, which is now persisted in the DockState objects and if you want to exclude the closed docks' state from saving, you could just remove it from the state list. On the other hand, RadDockLayout's method GetRegisteredDocksState() now has a new overload, which allows passing a boolean parameter, indicating which DockState objects to be included in the resulting list: when the parameter value is true, the closed states are not included, otherwise, they are included.

Sincerely yours,
Valeri Hristov (Senior Developer, MCSD)
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Tim
Top achievements
Rank 1
answered on 24 May 2007, 07:35 AM
Thanks Aron. I think I get the idea but some example code would be great if you have some.

Thanks again.

Tim
0
Aron Calder
Top achievements
Rank 1
answered on 24 May 2007, 11:47 AM
Hi Valeri,

That's what I have been trying, but it causes a javascript error on the page followed by an "Invalid JSON Primitive." error.

Try changing the code in the example attached in this thread like this: Using the overload to exclude closed docks.

    protected void RadDockLayout1_SaveDockLayout(object sender, DockLayoutEventArgs e)  
    {  
        //Save the dock state in the session. This will enable us  
        // to recreate the dock in the next Page_Init.  
        CurrentDockStates = RadDockLayout1.GetRegisteredDocksState(true);  
    } 

Add some docks, then close one of the docs, then try and add another dock and you'll get the javascript error. Then click the "add" button again and you'll get the JSON error.

Looks like the problem is caused by the dock having the same name, but I'm not sure why the page will still have that reference if it has been removed?

Cheers

Aron
0
Jon Hobbs
Top achievements
Rank 1
answered on 24 May 2007, 12:24 PM
Thanks for the example project Petya,

Unfortunately I'm still a bit of a VB.net novice so I'm having trouble working out how it all works. When I put the project in a folder and try to run the myportal page i get the following error

"It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS."


Anyway, I think i'm going to have to go back to basics and try to work out how to save the state of each dock in a database for each person. I assume i'll have to programatically add the docks to the page once I've worked out who's logged in and what layout they have ?

I think it's great that Telerik provides example projects like this to forum users, very helpful and beyond most people expectations I'm sure. However, for idiots like me it would really help to have some kind of articles written on how to achieve common tasks like this and an explanation of how it all works. Is there any chance of anything being added to the knowledge base in the future about how to set up a portal site with a "save layout " and "add widgets" button, preferably saving customers settings to a SQL databse ?
0
tbutcher
Top achievements
Rank 1
answered on 24 May 2007, 12:44 PM
I couldn't agree more the examples are excellent and make our life a whole lot easier. However I would really appreicate a little extension to this example to so how to set preferences of a custom user control such as an RSS reader because I am bit lost at the moment.

Thanks again.

Tim
0
mikejoseph
Top achievements
Rank 1
answered on 24 May 2007, 12:48 PM
Jon, I was getting that MachineToApplication Error too, but it was because I opened the wrong folder.  You have to open the websute WebPortal folder instead, which contains the Web.config for the app.
0
mikejoseph
Top achievements
Rank 1
answered on 24 May 2007, 02:12 PM
Hi again all,

Did anyone actually get this sample working?  Unfortunately, I just assumed the sample would work when I went ahead and did my VB.NET translation.  I ran my project, which implements the conventions put forth in the example, but when I tried adding instances of particular modules to my portal page, the "Add Dock" button didn't work at all.  In an attempt to debug my problem, I went back to the original c# sample that I downloaded from this forum thread.

When I ran the sample project, I was able to login as me/me ...  Upon logging in, I saw the RadDock instances in place like I would expect.  I closed all the radDock instances and tried selecting a module and adding that module to either RadDockZone.  However, unfortunately, the dock instances weren't being added back into the RadDockZones.

Any ideas?  Thanks in advance.

Mike Joseph
0
Aron Calder
Top achievements
Rank 1
answered on 24 May 2007, 02:25 PM
Hi All,

I have the examples working fine, in VB.NET, other than the issue of closing a dock and physically removing it from the state management.

I have successfully implemented the state management of the user controls as well, so that an entire "widget" instance (raddock + usercontrol) can be re-created for each user and on each page (tab).

I still have a few issues to work through at the moment, but have got a RSS Widget working, very similar to the those on www.netvibes.com and www.pageflakes.com.

Unfortunately the code isn't in a suitable format to make available at present.

For those that want to know how to implement this kind of functionality have a read of this excellent article http://www.codeproject.com/Ajax/MakingGoogleIG.asp where all of the above are discussed and solutions provided. Just adapt for your own needs.

Cheers

Aron

0
mikejoseph
Top achievements
Rank 1
answered on 24 May 2007, 02:35 PM
Haha... that's funny Aron... I'm doing the EXACT same thing.  I created a Media RSS Reader in combination w/ many other widgets to mimick the functionality in netvibes as well.

Any possibility you could cut and paste code snippets and replace sensitive info w/ psuedo comments? :)

MJ
0
mikejoseph
Top achievements
Rank 1
answered on 24 May 2007, 02:38 PM
I also have a support request in... if I hear anything back positive, I'll post the results.  Thanks!        
0
Jon Hobbs
Top achievements
Rank 1
answered on 29 May 2007, 12:40 PM
Mave you heard anything back yet mike ?

I still have no idea where to start with this.
0
mikejoseph
Top achievements
Rank 1
answered on 29 May 2007, 05:00 PM
Hi Jon -

Yes, I have heard back from them.  They are in the midst of a holiday in their part of the world, so I guess they are catching up, but below is the reply I received from them.  These guys are awesome. :)  If they don't post the code sample they send before I do, I'll make sure it gets up here.

Best,
Mike Joseph

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


Hi Michael,

I checked that forum thread, but it became quite long and now contains many problems of many different people. IMHO it is becoming complete mess, so I will try to create a new example in both C# and VB.NET, which demonstrates our "best practice" suggestion for implementing portal applications, including widget configuration, etc. I am not sure how much time it will take, but most probably I will be able to post it before wednesday. Let me know if you have specific requirements, which should be taken into account in the sample.

Best wishes,
Valeri Hristov (Senior Developer, MCSD)
the Telerik team
0
Petya
Telerik team
answered on 30 May 2007, 02:17 PM
Hi,

As I already wrote Michael, currently our team is quite understaffed and our work is seriously overwhelmed. Therefore, even though the example we work on is not complete, we decided to send it to you at the stage that it is now - state is preserved in database. What we have left is some work with configuring the widgets. While we continue our work, any feedback is appreciated. Please, find attached the current stage of the example.


Best wishes,
Petya
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jon Hobbs
Top achievements
Rank 1
answered on 30 May 2007, 03:10 PM
Hi Petya,

I just downlaoded that zip file and viewed default.aspx and got the following error..

Compiler Error Message: CS0117: 'Telerik.Web.UI.DockState' does not contain a definition for 'Closed'

Line 122:               return pageWidgetInfo.ID == stateWidgetID; 
Line 123:           }); 
Line 124:           if (pageWidget != null && !state.Closed) 
Line 125:           { 
Line 126:               pageWidget.State = state.ToString(); 

0
Ubong
Telerik team
answered on 01 Jun 2007, 10:23 AM

Hello Jon,

Could you try again with the last version of the Telerik.Web.UI dll again? I just ran this and did not have the errors you mention.

Best regards,
Ubong
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
tbutcher
Top achievements
Rank 1
answered on 01 Jun 2007, 11:55 AM
I don't get the above error but I do get:

Object reference not set to an instance of an object.

dock.ApplyState(DockState.Deserialize(pageWidgetInfo.State));

Tim
0
mikejoseph
Top achievements
Rank 1
answered on 01 Jun 2007, 02:53 PM
I got the same thing.  I had to put an if statement around the trouble lines to check if null...  now I'm no c# guy, but I had to actually put in opposite of what I thought for it to actually work. 

Here's what I tried first:
if (pageWidgetInfo.State != null) {
  dock.ApplyState(DockState.Deserialize(pageWidgetInfo.State));
}

You'll have to do this somewhere else in the code as well.

But here's what I had to type to get it to work oddly enough (I even stepped into the debugger and got odd results:
if (pageWidgetInfo.State == null) {
  dock.ApplyState(DockState.Deserialize(pageWidgetInfo.State));
}

As Petya commented, the code sample isn't really ready for prime-time, but has some basic amount of function to at least 'get the idea'...  I'm working on my VB.NET translation (among other tasks) today...  I think when this code sample is tightened up and out of 'alpha' release, that it should go into the code samples.  I can't think of any portal application where saved wouldn't be saved to some sort of server-based database.

Hope this helps,

Mike
0
tbutcher
Top achievements
Rank 1
answered on 05 Jun 2007, 06:29 PM
Has anybody managed to convert this code to vb.net yet? I am getting stuck on PageWidgetInfo pageWidget = PageWidgets.Find(delegate(PageWidgetInfo pageWidgetInfo), in the DockLayout_SaveDockLayout sub on the default page. What is it in vb.net?

Thanks.

Tim
0
Theodore Kasten
Top achievements
Rank 1
answered on 05 Jun 2007, 10:48 PM
Thanks for the sample but as others have noted, it doesn't quite work yet.  As you can see, there are a lot of people that are anxiously awaiting this type of functionality.   A full functional demo would be highly highly appreciated.

Thanks a lot.
0
Valeri Hristov
Telerik team
answered on 06 Jun 2007, 08:05 AM
Hello everybody,

I created a new a new sticky thread and attached a VB.NET and a C# versions of the latest version of the sample. Please, check it out and send us your comments.
http://www.telerik.com/community/forums/thread/b311D-mkttd.aspx

Sincerely yours,
Valeri Hristov (Senior Developer, MCSD)
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Jon Hobbs
Top achievements
Rank 1
answered on 07 Jun 2007, 08:32 PM
Valeri,

When I run the demo locally under Visual Web Developer 2005 I get the following error..


Server Error in '/PortalSiteVB' Application.

An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)

Source Error:

Line 18:    Public Shared Function GetOpenConnection() As SqlConnection
Line 19: Dim connection As New SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString1").ToString())
Line 20: connection.Open()
Line 21: Return connection
Line 22: End Function 'GetOpenConnection

0
mikejoseph
Top achievements
Rank 1
answered on 08 Jun 2007, 12:55 AM
Depricated post ...  [deleted text as it refers to a previous assembly no longer applicable] ...
0
Valeri Hristov
Telerik team
answered on 08 Jun 2007, 07:24 AM
Jon: the provided connection string and database are for SQL Express. If you don't have it installed on your machine you could get this error. You could import the database in SQL Server 2005. It is quite simple and it can be done even by hand.

Michael: do you use the "Prometheus" version from this forum thread? I think that it should not generate the exceptions you are getting. If you still experience problems integrating the example in your application, I could help you via GoToMeeting (although we do this in very rare occasions), but this could be done on Monday at the earliest.

Best wishes,
Valeri Hristov (Senior Developer, MCSD)
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
mikejoseph
Top achievements
Rank 1
answered on 08 Jun 2007, 12:43 PM
Hi Valeri,

At first i wasn't using that assembly from the thread and I found that after I replied, but it didn't make anything act any differently once implemented.  Today, I'll start it over from scratch and the new assembly to see if it all works out-of-box and then see if I can implement into my current project.  Thanks again for the help.  I'll tinker with it more for a while today to see if I can work it out.

Thanks!

Mike
0
mikejoseph
Top achievements
Rank 1
answered on 09 Jun 2007, 01:23 PM
Indeed Valeri... that new build did the trick...

Also, those misbehaving async-postback triggers I mentioned were due to an unrelated javascript error.

Thanks again for all the help and I'll post any results or improvments.

Mike
0
mikejoseph
Top achievements
Rank 1
answered on 18 Jun 2007, 08:53 PM
Hi all... 

I tried the latest build under the sticky threads and I adapted it to work with my application and YAY, it works.  At least the positioning and the remembering of those positions.  The one thing I'm having a problem with is that my events within the widgets don't seem to be getting fired.  For example, one of my widgets is a Weather Forecast.  The widget shows a 5-day forecast for the days and then there's a link button within the control called "Change Zipcode" ... upon clicking that button, you should be able to see a textbox to update your zip, but when I click the button, absolutely nothing happens.  I'll continue to research this, but does anyone have any suggestions as to how to get by this?

If anyone wants to see how this works, use my test account:
http://www.mytoyotapage.com/
Login: test@testing.com
Pass: password

Upon logging in, you'll see the weather forecast and notice you can change it.  Great... :)  Now navigate to:
http://www.mytoyotapage.com/Portal.aspx

You'll notice you can add and drag and remove widgets and re-navigating to the page maintains the positioning... but if you try to add a weather widget, you will notice that the Change Zipcode button doesn't work.

Thanks,
Mike
0
Petya
Telerik team
answered on 19 Jun 2007, 11:09 AM
Hello,

It is extremely hard for us to determine the cause of your problem. We would require some running code that reproduces the issue so we can work on and try to provide a solution. If it absolutely impossible for you to create and send us a simplified version of your code reproducing the error, then please at least turn off the redirect to your custom error page so we can see the stack trace and try to figure out why this occurs. Looking forward to your reply.


Best wishes,
Petya
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
mikejoseph
Top achievements
Rank 1
answered on 20 Jun 2007, 03:21 PM
Just to follow up for anyone following the thread -

I provided Petya with some sample code through the support ticket threads.  Here's what I got in response.

From: telerik
Date: 6/20/2007 7:04:01 AM
Hi Michael,

Thank you for providing us with a simplified version of your code. Even simplified to this extend it is not of a small amount, so I hope that I am not missing something and the suggestion I will offer you to solve your problem will be an appropriate one.  Please, place an asp:updatepanel around all the content in WeatherBox.ascx. I hope you find this solution satisfactory.

All the best,
Petya
the Telerik team


 
From: mikejoseph
Date: 6/20/2007 10:18:46 AM
Thanks so much, Petya...

I love it when the solution is simple, though it makes me feel like a big dummy I've banged my head for so long on it!

Thanks again,

Mike
0
mikejoseph
Top achievements
Rank 1
answered on 20 Jun 2007, 03:22 PM
Hey Jon Hobbs,

You ever get yours working?

MJ
0
Tulika
Top achievements
Rank 1
answered on 08 Jun 2009, 08:22 AM
Hi,

I'm working on 'MyPortalWithDB.zip' project. While running this application fetching error:

Server Error in '/MyPortalWithDB' Application.

No parameterless constructor defined for type of 'System.String'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.MissingMethodException: No parameterless constructor defined for type of 'System.String'.

Source Error:

Line 47:                     if (!string.IsNullOrEmpty(serializedState))
Line 48:                     {
Line 49:                         DockState state = DockState.Deserialize(serializedState);
Line 50:                         _currentDockStates.Add(state);
Line 51:                     }

Source File: e:\Rad Download\MyPortalWithDB\MyPortal.aspx.cs    Line: 49

Stack Trace:

[MissingMethodException: No parameterless constructor defined for type of 'System.String'.]
   System.Web.Script.Serialization.ObjectConverter.ConvertDictionaryToObject(IDictionary`2 dictionary, Type type, JavaScriptSerializer serializer) +2133
   System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer) +95
   System.Web.Script.Serialization.ObjectConverter.ConvertObjectToType(Object o, Type type, JavaScriptSerializer serializer) +267
   System.Web.Script.Serialization.ObjectConverter.ConvertDictionaryToObject(IDictionary`2 dictionary, Type type, JavaScriptSerializer serializer) +1680
   System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer) +95
   System.Web.Script.Serialization.ObjectConverter.ConvertObjectToType(Object o, Type type, JavaScriptSerializer serializer) +267
   System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit) +209
   System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(String input) +106
   Telerik.Web.UI.DockState.Deserialize(String input) in C:\Work\ControlSources\Telerik.Web.UI\Dock\DockState.cs:259
   MyPortal.get_CurrentDockStates() in e:\Rad Download\MyPortalWithDB\MyPortal.aspx.cs:49
   MyPortal.Page_Init(Object sender, EventArgs e) in e:\Rad Download\MyPortalWithDB\MyPortal.aspx.cs:129
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +37
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +91
   System.Web.UI.Control.OnInit(EventArgs e) +128
   System.Web.UI.Page.OnInit(EventArgs e) +36
   System.Web.UI.Control.InitRecursive(Control namingContainer) +535
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2039


Kindly advice for the same.
0
Obi-Wan Kenobi
Top achievements
Rank 1
answered on 09 Jun 2009, 01:24 PM
I searched through forums and I found something similar which is resolved by changing method to use ByVal  instead of ByRef.
Hope this helps.
0
ctca
Top achievements
Rank 1
answered on 06 Feb 2010, 05:55 PM
The link that is provided about the sticky (http://www.telerik.com/community/forums/thread/b311D-mkttd.aspx) just gives a server error.

Does anyone know where I can find that thread or know of a place that has a working example of how to store user persistence in a database for rad docks like the original poster is talking about?
0
Pero
Telerik team
answered on 09 Feb 2010, 12:18 PM
Hello vipergtsrz,

The following examples from our Code Library demonstrate how to dynamically create RadDock controls and save their state in a DataBase:



All the best,
Pero
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
ctca
Top achievements
Rank 1
answered on 09 Feb 2010, 01:18 PM
Thank you very much for getting back to me. This helps a lot.
Tags
Dock
Asked by
Jon Hobbs
Top achievements
Rank 1
Answers by
Jon Hobbs
Top achievements
Rank 1
Petya
Telerik team
gil_yoktan
Top achievements
Rank 1
mikejoseph
Top achievements
Rank 1
Aron Calder
Top achievements
Rank 1
Tim
Top achievements
Rank 1
Valeri Hristov
Telerik team
tbutcher
Top achievements
Rank 1
Ubong
Telerik team
Theodore Kasten
Top achievements
Rank 1
Tulika
Top achievements
Rank 1
Obi-Wan Kenobi
Top achievements
Rank 1
ctca
Top achievements
Rank 1
Pero
Telerik team
Share this question
or