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

load controls into div or panel

1 Answer 341 Views
This is a migrated thread and some comments may be shown as answers.
Zbigniew Kozłowski
Top achievements
Rank 1
Zbigniew Kozłowski asked on 26 Oct 2010, 11:36 AM
i've got a problem and dont know how to make it. Ive got a master site:
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Default.master.cs" Inherits="Gambu.Client.Web.Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<head runat="server">
    <asp:ContentPlaceHolder ID="head" runat="server">
    <telerik:RadStyleSheetManager id="RadStyleSheetManager" runat="server" />
    <link rel="stylesheet" type="text/css" href="./Styles/Table.css" />
    <form id="MainForm" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager" runat="server">
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        <telerik:RadAjaxManager  ID="RadAjaxManager" runat="server" EnableHistory="True" />
        <telerik:RadSkinManager ID="RadSkinManager" Runat="server" Skin="Windows7" />
        <telerik:RadFormDecorator ID="RadFormDecorator" runat="server" Skin="Windows7" />
        <asp:ContentPlaceHolder ID="MainContentPlaceHolder" runat="server">
Default.cs: OnLoad i check if user is logged in, if no than show window with login:
var rWindow = new RadWindow();
rWindow.Title = "Logowanie";
rWindow.NavigateUrl = "Users/Login.aspx";
rWindow.Skin = "Windows7";
rWindow.IconUrl = "--";
rWindow.AutoSize = true;
rWindow.Modal = true;
rWindow.EnableShadow = true;
rWindow.EnableViewState = false;
rWindow.VisibleTitlebar = true;
rWindow.VisibleStatusbar = false;
rWindow.VisibleOnPageLoad = true;
rWindow.ShowContentDuringLoad = false;
rWindow.OnClientClose = "OnClientClose";
rWindow.Behaviors = Telerik.Web.UI.WindowBehaviors.Move;
After user loggs in, i close the window and an event is fired:
function OnClientClose(oWnd, args) {
        var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>");
 it fires in Default.aspx:
<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Gambu.Client.Web.Default1" %>
<asp:Content ID="HeadContent" ContentPlaceHolderID="head" runat="server"></asp:Content>
<asp:Content ID="MainContent" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy" runat="server"></telerik:RadAjaxManagerProxy>
<script type="text/javascript">
    function OnClientClose(oWnd, args) {
        var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>");
<telerik:RadWindowManager ID="WindowManager" runat="server" />
<telerik:RadSplitter ID="MainRadSplitter" runat="server" Width="100%" Height="100%" LiveResize="True" Orientation="Horizontal">
    <telerik:RadPane ID="MainTopRadPane" runat="server" Height="30px" Scrolling="None"></telerik:RadPane>
    <telerik:RadPane ID="MainMiddleRadPane" runat="server" Scrolling="None">
        <telerik:RadSplitter ID="MainContentRadSplitter" runat="server" Width="100%" Height="100%" LiveResize="True" Orientation="Vertical">
            <telerik:RadPane ID="MainLeftMenuRadPane" runat="server" MinWidth="200" Width="250px" Scrolling="None">               
                <asp:Panel ID="MainLeftMenuPanel" runat="server"></asp:Panel>
                <div id="test" runat="server"></div>
            <telerik:RadSplitBar ID="MainMiddleRadSplitBar" runat="server" CollapseMode="Forward"></telerik:RadSplitBar>
            <telerik:RadPane ID="MainContentRadPane" runat="server" Scrolling="None">
so i got request in:
protected void AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
            RadAjaxManager manager = RadAjaxManager.GetCurrent(Page);
            test.InnerHtml = "test";
Alert is working fine, but i cant change any control  on the site, and id like to load into MainLeftMenuPanel a UserControl, not only this, because ill need to load 3 diffrent controls into 3 diffrent panels or divs

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 27 Oct 2010, 02:05 PM
Hello Zbigniew,

The RadAjaxManager control must be configured as an AJAX initiator with the parents of the controls that you want to add set as updated controls. Here is a similar scenario:

All the best,
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
Asked by
Zbigniew Kozłowski
Top achievements
Rank 1
Answers by
Telerik team
Share this question