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

Windows losing their properties

3 Answers 56 Views
Window
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 28 Sep 2010, 03:23 PM
I am using a window manager to create an MDI - the functionality is quite standard:
1. On initial page load begin with 2 windows.
2. Populate a treeview with more options (windows) for them to show.
3. Allow them to close out the windows they have already opened
4. When done persist all changes in the database (windows, locations, dimensions, etc)

Basically, a dashboard.  I have most of it working, but I am running into a challenge because it appears when the windows are initially created (server side) they go out with an ID I assign to them.  Upon postbacks it appears they lose the ID assigned, and use "ctlxx" (where xx is a sequential number).  In order to synch the state between the client and server I need to know which windows they closed / changed so I can remove them from the window manager.  This part is important because I want to be able to save the dashboard and allow them to reload it as-is in the future - if they are just adding / resizing windows it works; it's when they remove them I have problems.  Things tried:

1. EnableViewState enabled / disabled on both the window and manager.  Tried different combinations.
2. PreserveClientState for the manager is set to true.

Has anyone attempted this?  I am so close...  does anyone have any suggestions?

Thank you,
John


3 Answers, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 28 Sep 2010, 06:11 PM
Hello John,

From what I know and read on the forums, there is no way to know if a RadWindow was removed or not since it's done client-side. I think the best approach would be to log which windows have been closed into a HiddenField or something like that to determine the state of those windows.

I hope that helps.
0
IT
Top achievements
Rank 1
answered on 28 Sep 2010, 06:15 PM
(This is John, but from another computer) 

Thank you for the suggestion - that is exactly what i am doing.  I have a hidden field that keeps "state" (all windows that are still currently open with their ID and coordinates).  When a user closes out a window it removes it from the hidden field.  The problem is when a user closes one (say in the middle of the collection) and a postback happens, all the window id's are reset with an autocounter, and there is no guarantee they are in the same order.  I have no way to identify which one of the windows was truly closed.  :(
0
Georgi Tunev
Telerik team
answered on 30 Sep 2010, 01:05 PM
Hello John,

I see that Svetlina has already answered your support ticket on the same subject. Basically the ID problem is not directly related to the RadWindowManager control and its ViewState but this is how all ASP.NET server controls work by default. To achieve the desired functionality, you will need a different approach - for example to use a hidden field to persist the index of the RadWindows there.


Sincerely yours,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Window
Asked by
John
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
IT
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or