C1 Community
ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Remember last size/position of WebDialog

rated by 0 users
This post has 5 Replies | 0 Followers

Not Ranked
Posts 9
Louie88 Posted: Thu, Mar 13 2008 3:18 AM

Is it possible to „remember” the last size/position of the WebDialog and restore it after the page is posted back? I have multiply reports and I show the generated PDF files in WebDialog. The user can change the position and size the dialog but if he starts another report it would be nice to remember the dialog’s earlier position and size and restore it after the new report is generated.  Thanks, Louis

Top 10 Contributor
Posts 1,101
Hi,
 
attached is a sample that shows how to remember dialog sizes and position between postbacks.
 
Regards,
Sergey.
<Louie88> wrote in message news:202817@10.0.1.98...

Is it possible to „remember” the last size/position of the WebDialog and restore it after the page is posted back? I have multiply reports and I show the generated PDF files in WebDialog. The user can change the position and size the dialog but if he starts another report it would be nice to remember the dialog’s earlier position and size and restore it after the new report is generated.  Thanks, Louis



http://helpcentral.componentone.com/cs/forums/p/74614/202817.aspx#202817

Not Ranked
Posts 9
Louie88 replied on Wed, Mar 19 2008 3:07 AM
Hi Sergey, Thanks for the demo. When I compiled it I got a couple of errors (missing Infragistics controls) in web.config. I commented out them. The main problem is that it does not remember the size/position. I guess I have an old version of WebDialog (2.0.20072). In your code you have <StatusTemplate> but it caused compilation error here. Also I do not have get_style() method, so onFormSubmit() could not get the size info of WebDialog.  Thanks,Louis

 

Top 10 Contributor
Posts 1,101
Hi Louis,
 
attached is a sample that works correctly with the version available here http://prerelease.componentone.com/dotnet20/c1webdialog/2007-t3/c1webdialog.2_2.0.20073.27.zip
 
Regards,
Sergey.
<Louie88> wrote in message news:203018@10.0.1.98...
Hi Sergey, Thanks for the demo. When I compiled it I got a couple of errors (missing Infragistics controls) in web.config. I commented out them. The main problem is that it does not remember the size/position. I guess I have an old version of WebDialog (2.0.20072). In your code you have <StatusTemplate> but it caused compilation error here. Also I do not have get_style() method, so onFormSubmit() could not get the size info of WebDialog.  Thanks,Louis

 



http://helpcentral.componentone.com/cs/forums/p/74614/203018.aspx#203018

Not Ranked
Posts 10
shovaly replied on Wed, Oct 15 2008 9:58 AM

 Cool

but...what about doing the same for multiple webdialogs....do you have any suggestions

Top 10 Contributor
Posts 1,101
Hi,
 
since version 2.0.20082.31 dialog retains it's sizes automatically.
 
For previous versions you can use the sample I provided in the last post but adapt it for several dialogs. Either loop through Form.Controls to find the dialogs or store their IDs in array or something.
 
Regards,
Sergey.
<shovaly> wrote in message news:209918@10.0.1.98...

 Cool

but...what about doing the same for multiple webdialogs....do you have any suggestions



http://helpcentral.componentone.com/cs/forums/p/74614/209918.aspx#209918

Page 1 of 1 (6 items) | RSS
Contact ComponentOne: 1.800.858.2739 ©1987-2010 ComponentOne LLC All Rights Reserved.