Welcome Guest Search | Active Topics | Sign In | Register

LinkButton in Footer template of Dialog control doesnt PostBack Options
intermas
Posted: Friday, October 16, 2009 11:58:56 AM
Rank: Advanced Member
Groups: Member

Joined: 8/22/2009
Posts: 30
I have a problem with Dialog control.

I have a ListView which has in every Item UpdatePanel which has Dialog control.
In Footer template of Dialog control there is LinkButton but when I press it, nothing happens, dialog isn't closed and PostBack isn't invoked.

I have tested same situation outside of ListView, in one UpdatePanel, and there works fine.

What is the problem?
eo_support
Posted: Friday, October 16, 2009 12:34:11 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Please create a test page that demonstrates the problem. Once we have that we will try to deubg it here and see what we can find.

Thanks!
intermas
Posted: Friday, October 16, 2009 4:21:32 PM
Rank: Advanced Member
Groups: Member

Joined: 8/22/2009
Posts: 30
eo_support wrote:
Hi,

Please create a test page that demonstrates the problem. Once we have that we will try to deubg it here and see what we can find.

Thanks!

I would, but it's not that easy, because it involves so many controls.

I have some questions.
I have found out that when I remove all content from ContentTemplate then button in FooterTemplate do postback.
The difference that I have found between filled and empty ContentTemplate is in generated onclick event for LinkButton in FooterTemplate.
When there exists controls in ContentTemplate then this is generated for onclick event:
javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$cphInnerContent$lstv$ctrl0$eodlg$ctl01$lnkbtn", "", true, "", "page.aspx", false, true))

When ContentTemplate is empty then this is generated for onclick event:
javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$cphInnerContent$lstv$ctrl0$eodlg$ctl01$lnkbtn", "", false, "", "page.aspx", false, true))

I have marked parameter with red color that is different.

Hope this helps.
eo_support
Posted: Friday, October 16, 2009 4:27:40 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
intermas wrote:
I would, but it's not that easy, because it involves so many controls.


That's exactly why we ask you to produce a test page. We are not in a position to troubleshoot your code, so we always need you to isolate the problem first. We also need a test page to verify whatever solution we come up indeed resolve the problem for you. Please see here for more details:

http://www.essentialobjects.com/forum/postst3013_I-run-into-a-problem-can-I-send-over-my-code-so-that-you-can-take-a-look.aspx

Thanks
eo_support
Posted: Friday, October 16, 2009 8:24:22 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

We have looked into the code you sent to us. The behavior is normal. All validators are run when you try to submit the page, including the invisible ones. So after you entered something and click submit in the dialog, all other RequiredValidators that were created for other rows were failing, which prevent your page from being submitted. In order to resolve the issue, you need to either assign different ValidationGroup value to controls for different row; or use a single dialog for all rows.

Thanks
intermas
Posted: Friday, October 16, 2009 10:05:52 PM
Rank: Advanced Member
Groups: Member

Joined: 8/22/2009
Posts: 30
eo_support wrote:
Hi,

We have looked into the code you sent to us. The behavior is normal. All validators are run when you try to submit the page, including the invisible ones. So after you entered something and click submit in the dialog, all other RequiredValidators that were created for other rows were failing, which prevent your page from being submitted. In order to resolve the issue, you need to either assign different ValidationGroup value to controls for different row; or use a single dialog for all rows.

Thanks


Thank you, it didn't crossed my mind, that is solved.
Now, I have different problem, I am not sure you can help me.
LinkButton is causing full postback instead of async postback.
Can you help me on this?

In my dialog test page that is not happening, but on my development page is happening, I am not sure why.
eo_support
Posted: Saturday, October 17, 2009 12:55:44 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

The reason is the dialog is being taken outside of the regular page layout once it is shown. So it is no longer a child control of your UpdatePanel. There are several workarounds. One way is to use our CallbackPanel instead of UpdatePanel; Another way is to explicitly set the UpdatePanel's Triggers. You can also move the UpdatePanel inside the dialog's ContentTemplate.

Thanks
intermas
Posted: Sunday, October 18, 2009 1:40:40 PM
Rank: Advanced Member
Groups: Member

Joined: 8/22/2009
Posts: 30
eo_support wrote:
Hi,

The reason is the dialog is being taken outside of the regular page layout once it is shown. So it is no longer a child control of your UpdatePanel. There are several workarounds. One way is to use our CallbackPanel instead of UpdatePanel; Another way is to explicitly set the UpdatePanel's Triggers. You can also move the UpdatePanel inside the dialog's ContentTemplate.

Thanks


I have tried already EO CallbackPanel, but it's the same behavior as UpdatePanel.
I have set EO Dialog control as Triggers and that works.
Thanks for help, I appreciate it.
eo_support
Posted: Monday, October 19, 2009 9:16:05 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Great. Glad that it worked for you!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.