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

Rad Panel Item , Menu and XMLwindow

3 Answers 72 Views
XmlHttpPanel
This is a migrated thread and some comments may be shown as answers.
dotnetrockerzzz
Top achievements
Rank 2
dotnetrockerzzz asked on 22 Aug 2010, 12:17 PM
I have Rad panel Item on left  and xml window on right . When anyone clicks on childradpanelitem1 i want that about.htm loads in the xml window.

The Rad panel Items actually contains submenu of the selected main menu . That means when anyone clicks the submenu of my menu the respective file must appear in xml window . That is when he clicks on About Us (main menu) > Contact us (sub menu) the xml window must come loaded with contact.htm .

 I  want to have 6 aspx files for 6 menus and able to jump from one file to another depending on the submenu cicked . That means i am on Admission.aspx but user clicks on About Us (main menu) > Contact us (sub menu) which is in the file about.aspx and in that also the xml window must come loaded with contact.htm .

3 Answers, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 25 Aug 2010, 09:58 AM
Hello Vaibhav,

Please note that providing and implementing custom solutions is beyond the scope of our support. I will explain how the XmlHttpPanel control works, and how it should be used, and you can decide whether it is suitable for your scenario.

How the XmlHttpPanel works?


Imagine you have a <div/> element, and you want to paste some HTML content within, using JavaScript. One would use either div.innerHTML or div.appendChild for this purpose. Well that's the underlying principle of the XmlHttpPanel. It pastes the HTML content received from the web service or the callback, within the panel's HTML element (<span/> or <div/>). This means that the WebService method should return HTML string which then will be pasted in the XmlHttpPanel element. In the callback event handler you should add Controls to the XmlHttpPanel, or modify the controls that are already in the XmlHttpPanel. If you want add pure HTML element, you should create a LiteralControl and set the HTML to its Text property.

Here is how a sample code should look like using both approaches:

WebService
[WebMethod]
public string GetHtml()
{
    return "<div style='color:Red;'>This is a DIV.</div>";
}

CallBack
protected void CallBackHandler(object sender, Telerik.Web.UI.RadXmlHttpPanelEventArgs e)
{
    RadXmlHttpPanel1.Controls.Add(new LiteralControl("<div style='color:Red;'>This is a DIV.</div>"));
}

More information about the XmlHttpPanel can be found on our online documentation.

Greetings,
Pero
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
dotnetrockerzzz
Top achievements
Rank 2
answered on 05 Sep 2010, 07:32 AM
Thanks for the Reply .Sir  should I use Ajax or xmlwindow . Xmlwindow won't work in my case so can u explain me how ajax works in radpanel just like u have explained me how Xml window works .
I am really sorry for my late response
0
Pero
Telerik team
answered on 08 Sep 2010, 01:43 PM
Hi Vaibhav,

I believe the RadAjaxManager will be suitable for your specific scenario. You can easily configure which controls (parts) of the page will be updated, and what is the trigger for the update to occur. You should take a look at our online demos to see the AjaxManager in action: http://demos.telerik.com/aspnet-ajax/ajax/examples/manager/firstlook/defaultcs.aspx. In case you have questions, you could always open a support ticket, or forum thread specifically for RadAjaxManager, and we will do our best to help you.

Kind regards,
Pero
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
XmlHttpPanel
Asked by
dotnetrockerzzz
Top achievements
Rank 2
Answers by
Pero
Telerik team
dotnetrockerzzz
Top achievements
Rank 2
Share this question
or