Feature not working the same after upgrade

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
1/31/2011 3:22:33 PM
Gravatar
Total Posts 22

Feature not working the same after upgrade

I've just upgraded to the latest version of mojoPortal and am testing my custom features.   I've also upgraded from VS2008 to VS2010.  One of my features includes an ASPxGridView.  This grid shows data and allows the user to sort it/filter it etc.  The sorting works fine if my feature is the only item on the mojoPage.  If I add another item eg HTMLContent sorting on a column will work once but if I try to resort on the same column (to change the sort order from Asc to Desc) it doesn't redisplay the data properly.  I've traced through the code in my feature and it goes through the same path each time but the results are not the same.  I can't understand why adding some HTMLContent to the page would cause it's behaviour to change.

If anyone has any thoughts on how to resolve this I'd really appreciate it.

Thanks.

 

2/1/2011 11:45:35 AM
Gravatar
Total Posts 18439

Re: Feature not working the same after upgrade

I've seen cases where when using an UpdatePanel the form action is lost after the first ajaxpostback so subsequent postbacks don't work correctly.

If that is the problem, you can solve it by adding this in a method like LoadSettings called from page load event

try
{
SiteUtils.SetFormAction(Page, Request.RawUrl);
}
catch (MissingMethodException)
{
//this method was introduced in .NET 3.5 SP1
}

part of the difference may also be because by default we target .NET 4 so there are changes in .NET 4 that can affect your existing code. It is still popssible to target .NET 3.5 as described here:

http://www.mojoportal.com/the-net-4-transition-plan-for-mojoportal.aspx

In general you should be using an UpdatePanel if you are posting back in a module control because it lives on a page with other modules so this is a way to prevent the postback from impacting other modules on the page.

You may also want to make sure you set

Page.EnableViewState = true;

Hope it helps,

Joe

2/1/2011 1:33:18 PM
Gravatar
Total Posts 22

Re: Feature not working the same after upgrade

Thanks Joe - that pointed me in the right direction.  I had some code in the Page_Load event because I wanted it to run after the SiteModuleControl initialisation.  For the grid to work correctly it needed to be in the Page_Init event.  It's now working correctly. 

Suzy

2/2/2011 6:35:27 AM
Gravatar
Total Posts 18439

Re: Feature not working the same after upgrade

Hi Suzy,

Glad you got it sorted.

Thanks for the beer! Much appreciated.

Cheers,

Joe

You must sign in to post in the forums. This thread is closed to new posts.