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

Telerik.Web.UI RADAjaxManager + MOSS

4 Answers 120 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Das
Top achievements
Rank 1
Das asked on 05 Feb 2009, 02:15 PM
Hi,

I am using Telerik.Web.UI 2008.2.1001.20. I am using RADAjaxManager which was working fine in classic (v1.8.5.0) in MOSS except for welcome message coming on top. So we changed to this new version which creates lot of issues. For the first time the page refreshes. For the second time everything seems to be fine. For the third time the loading panel won't come. But all these works fine only inside a grid if the EnableAjax Property is set to true. And after one AjaxPostback I am not able to group the columns. What do I miss here? Below is my code. Anything I need to add?

<

telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" EnableAJAX="true" DefaultLoadingPanelID="LoadingPanel1" UpdatePanelsRenderMode="Inline">

 

 

<AjaxSettings>

 

 

<telerik:AjaxSetting AjaxControlID="pnlVesselParams">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="pnlVessel" LoadingPanelID="LoadingPanel1"></telerik:AjaxUpdatedControl>

 

 

<telerik:AjaxUpdatedControl ControlID="pnlInspections" LoadingPanelID="LoadingPanel1"></telerik:AjaxUpdatedControl>

 

 

<telerik:AjaxUpdatedControl ControlID="pnlDocuments" LoadingPanelID="LoadingPanel1"></telerik:AjaxUpdatedControl>

 

 

<telerik:AjaxUpdatedControl ControlID="pnlVesselDetails" />

 

 

<telerik:AjaxUpdatedControl ControlID="pnlVesselImage" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

<telerik:AjaxSetting AjaxControlID="rgVessel">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="pnlVessel" LoadingPanelID="LoadingPanel1"></telerik:AjaxUpdatedControl>

 

 

<telerik:AjaxUpdatedControl ControlID="pnlInspections" LoadingPanelID="LoadingPanel1"></telerik:AjaxUpdatedControl>

 

 

<telerik:AjaxUpdatedControl ControlID="pnlDocuments" LoadingPanelID="LoadingPanel1"></telerik:AjaxUpdatedControl>

 

 

<telerik:AjaxUpdatedControl ControlID="pnlVesselDetails" />

 

 

<telerik:AjaxUpdatedControl ControlID="pnlVesselImage" />

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

<telerik:AjaxSetting AjaxControlID="rgInspections">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="pnlInspections" LoadingPanelID="LoadingPanel1"></telerik:AjaxUpdatedControl>

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

<telerik:AjaxSetting AjaxControlID="rgDocuments">

 

 

<UpdatedControls>

 

 

<telerik:AjaxUpdatedControl ControlID="pnlDocuments" LoadingPanelID="LoadingPanel1"></telerik:AjaxUpdatedControl>

 

 

</UpdatedControls>

 

 

</telerik:AjaxSetting>

 

 

</AjaxSettings>

 

 

</telerik:RadAjaxManager>

 

 

<telerik:RadAjaxLoadingPanel Transparency="50" Style="background-color: #E4E2DA;" runat="Server"

 

 

ID="LoadingPanel1" >

 

 

<asp:Image ID="Image2" ImageUrl="/RadControls/Ajax/Skins/Default/loading.gif" AlternateText="Loading"

 

 

BorderWidth="0px" runat="server"></asp:Image>

 

 

</telerik:RadAjaxLoadingPanel>

 

4 Answers, 1 is accepted

Sort by
0
Das
Top achievements
Rank 1
answered on 06 Feb 2009, 06:05 AM
Please find below the code of the webpart which I use to host the UserControl:

[

DefaultProperty("Text"),

 

 

ToolboxData("<{0}:UserControlContainer runat=server></{0}:UserControlContainer>"),

 

 

XmlRoot(Namespace = "ReflectionIT.SharePoint.WebParts")]

 

 

public class ContainerToHostAjaxUserControl : Microsoft.SharePoint.WebPartPages.WebPart

 

{

 

private const string defaultText = "";

 

 

private string _userControl = defaultText;

 

 

private Control _control = null;

 

[

Browsable(true),

 

 

Category("User Control"),

 

 

DefaultValue(defaultText),

 

 

WebPartStorage(Storage.Personal),

 

 

FriendlyName("User Control (.ascx)"),

 

 

Description("Path to the User Control (.ascx)")]

 

 

public string UserControl

 

{

 

get

 

{

 

return _userControl;

 

}

 

set

 

{

_userControl =

value;

 

}

}

 

/// <summary>

 

 

/// This method gets the custom tool parts for this Web Part by overriding the

 

 

/// GetToolParts method of the WebPart base class. You must implement

 

 

/// custom tool parts in a separate class that derives from

 

 

/// Microsoft.SharePoint.WebPartPages.ToolPart.

 

 

/// </summary>

 

 

///<returns>An array of references to ToolPart objects.</returns>

 

 

public override ToolPart[] GetToolParts()

 

{

 

ToolPart[] toolparts = new ToolPart[3];

 

 

WebPartToolPart wptp = new WebPartToolPart();

 

 

CustomPropertyToolPart custom = new CustomPropertyToolPart();

 

toolparts[0] = custom;

toolparts[1] = wptp;

 

//toolparts[2] = new CopyrightToolpart();

 

 

wptp.Expand(Microsoft.SharePoint.WebPartPages.

WebPartToolPart.Categories.Appearance);

 

custom.Expand(

"User Control");

 

 

return toolparts;

 

}

 

/// <summary>

 

 

/// Load the UserControl

 

 

/// </summary>

 

 

protected override void CreateChildControls()

 

{

 

base.CreateChildControls();

 

 

try

 

{

 

if (_userControl != defaultText)

 

{

_control =

this.Page.LoadControl(_userControl);

 

}

 

else

 

{

_control =

new LiteralControl(string.Format("To link to content, <a href=\"javascript:MSOTlPn_ShowToolPaneWrapper('{0}','{1}','{2}');\">open the tool pane</a> and then type a URL in the Link text box.", 1, 129, this.ID));

 

}

}

 

catch (System.Exception ex)

 

{

_control =

new LiteralControl(string.Format("<b>Error:</b> unable to load {0}<br /><b>Details:</b> {1}", _userControl, ex.Message));

 

}

 

if (_control != null)

 

{

 

// Add to the Controls collection to support postback

 

 

this.Controls.Add(_control);

 

}

}

 

 

/// <summary>

 

 

/// Render this Web Part to the output parameter specified.

 

 

/// </summary>

 

 

/// <param name="output"> The HTML writer to write out to </param>

 

 

protected override void RenderWebPart(HtmlTextWriter output)

 

{

EnsureChildControls();

 

if (_control != null)

 

{

_control.RenderControl(output);

}

}

 

protected override void OnInit(EventArgs e)

 

{

 

base.OnInit(e);

 

 

//Page.ClientScript.RegisterStartupScript(this.GetType(), this.ID, "_spOriginalFormAction = document.forms[0].action;_spSuppressFormOnSubmitWrapper=true;", true);

 

 

if (this.Page.Form != null)

 

{

 

string formOnSubmitAtt = this.Page.Form.Attributes["onsubmit"];

 

 

if (!string.IsNullOrEmpty(formOnSubmitAtt) && formOnSubmitAtt == "return _spFormOnSubmitWrapper();")

 

{

 

this.Page.Form.Attributes["onsubmit"] = "_spFormOnSubmitWrapper();";

 

}

}

 

//ScriptManager scriptManager = RadScriptManager.GetCurrent(this.Page);

 

 

 

ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);

 

 

if (scriptManager == null)

 

{

scriptManager =

new ScriptManager();

 

 

this.Page.Form.Controls.AddAt(0, scriptManager);

 

}

 

ScriptManager.RegisterStartupScript(this, typeof(ContainerToHostAjaxUserControl), "UpdatePanelFixup", "_spOriginalFormAction = document.forms[0].action; _spSuppressFormOnSubmitWrapper=true;", true);

 

}

}

Is the issue something to do with ScriptManager used there? I also tried with RADAjaxManager. Please let me know the solution for this ASAP. Thanks.

0
Sebastian
Telerik team
answered on 06 Feb 2009, 08:38 AM
Hello Das,

See the response you received in this public forum thread:

http://www.telerik.com/community/forums/aspnet-ajax/ajax/radajaxmanager-sharepoint-welcome-message-urgent.aspx

Regards,
Sebastian
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Arun
Top achievements
Rank 1
answered on 06 Feb 2009, 09:43 AM
HI Sebastian,

I have implemented the same as specified in the link you have specified. The welcome message error is now fixed. But as Das (fyi, I work with him) has mentioned, using Telerik.Web.UI we got other issues. like,

1. The whole page will post back for the first time. (that is , Ajax will not work for the first time)
2. Ajax will work on subsequent post backs and Ajax loading panel will work once. but there is no effect of Ajax loading panel. It looks like using normal asp update panel.

Thanks and Regards,
Arun.G.K
0
Sebastian
Telerik team
answered on 09 Feb 2009, 05:42 PM
Hello Arun,

Does the same issue appear when you move the page with the grid outside of the MOSS context? If the problem is still there, can you please prepare a test page/project which recreates the issue, and send it enclosed to a formal support ticket? We will examine it locally and will get back to you with more info on the subject.

Kind regards,
Sebastian
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Das
Top achievements
Rank 1
Answers by
Das
Top achievements
Rank 1
Sebastian
Telerik team
Arun
Top achievements
Rank 1
Share this question
or