PDA

View Full Version : Window Position between postbacks



tonytony
Aug 08, 2008, 5:55 AM
i am a novice asp.net/ajax programmer.i am creating a window with coolite and i have to make postbacks.But when postback occurs window is moved to starting position(commonly center of the page)
all i want to do is actually when a users press buttons windows are shown.And if a post back occurs all windows preserve their current properties (position,visible /unvisible etc...)
why i cant do this?

Secondly i couldn't find a tutorial.Is there a tutorial?

Timothy
Aug 08, 2008, 7:34 AM
Hello tonytony,

You should be able to do this with the following:




<Ext:ScriptManager runat="server" StateProvider="PostBack" />
<Ext:Window runat="server" ... StateFul="True">
...
</Ext:Window>


Cheers,
Timothy

tonytony
Aug 08, 2008, 8:55 AM
i did as you said.Unfortunately mywindow(coolite window) is still loosing its position on browser between postbacks.
It can preserve its members values (such as text on textbox etc..) but it comes to the startion position on every postback.

1-)does anyone has any idea about solving this problem?
2-)Isn't there a tutorial for using coolite ?

Timothy
Aug 08, 2008, 9:02 AM
Hmm, could be that the postback provider is not listening to the X/Y coordinates of the Window when reloading.

If you are simply refreshing in the contents of the window, you could always use a Microsoft AJAX UpdatePanel to suppress rendering outside the window again ;)

As for documentation the sandbox examples is the only real place at the moment. I know Coolite are working on them.

ExtJS API Documentation (http://www.extjs.com/deploy/dev/docs/)

Cheers,
Timothy

geoffrey.mcgill
Aug 08, 2008, 11:38 AM
Currently, the <ext:Window> does not maintain position on a PostBack. We have a built-in solution coming, although not with the v0.6 release.

Another option that might help is the upcoming <AjaxEvents> feature. The <AjaxEvents> will make a callback to the server and depending on what properties are set on the server, the Window position should not be affected.

What are you doing on the PostBack? I might be able to provide a code sample demonstrating how to perform the same functionality using the new <AjaxEvents>.