RadPanelBar with AjaxmanagerProxy PostBack Problem

4 posts, 0 answers
  1. Velkumar
    Velkumar avatar
    85 posts
    Member since:
    Apr 2011

    Posted 12 Mar 2012 Link to this post

    Hi,

               In my sharepoint project page I have a panelbar, a label, a radbutton. In the button click and panelbar item click  i have to postback tha page. In server side, I have written a code for getting the event argument  and set it into the label. In my page I have used RadAjaxManagerProxy for ajax operation. I have placed the radajaxmanager  in MasterPage. In the button click the label is successfully updated. My problem is that  in PanelBar Item click the page is postbacked but the label is not updated.

    I have attached the code below
    <telerik:RadScriptBlock ID="DemoScriptBlock" runat="server">
            <script type="text/javascript" language="javascript">
     
                function OnClientItemExpand(sender, args) {
     
                    $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest(args.get_item().get_value());
     
                }
     
     
                function OnButtonClick(sender, args) {
     
                    $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest(sender.get_text());
     
                }
     
            </script>
        </telerik:RadScriptBlock>
        <telerik:RadAjaxManagerProxy ID="PanelbarDemoAjaxmanagerProxy" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="uxProfileList">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="uxProfileList" />
                    </UpdatedControls>
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="DemoLabel" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="DemoButton">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="DemoButton" />
                    </UpdatedControls>
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="DemoLabel" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManagerProxy>
         
        <telerik:RadPanelBar ID="uxProfileList" OnClientItemClicked="OnClientItemExpand"
            OnClientItemExpand="OnClientItemExpand" ExpandMode="FullExpandedItem" Width="100%"
            runat="server">
            <Items>
                <telerik:RadPanelItem runat="server" Text="Personal Info" Value="PersonalInfo" Font-Bold="true">
                </telerik:RadPanelItem>
                <telerik:RadPanelItem runat="server" Text="Profile Info" Value="ProfileInfo" Font-Bold="true">
                </telerik:RadPanelItem>
                <telerik:RadPanelItem runat="server" Text="Education" Value="Education" Font-Bold="true">
                </telerik:RadPanelItem>
                <telerik:RadPanelItem runat="server" Text="WorkExperience" Value="WorkExperience"
                    Font-Bold="true">
                </telerik:RadPanelItem>
            </Items>
        </telerik:RadPanelBar>
     
        <asp:Label ID="DemoLabel" Text="Demo Label" runat="server"></asp:Label>
     
        
     
        <telerik:RadButton ID="DemoButton" Text="Demo Button" OnClientClicked="OnButtonClick" runat="server">
        </telerik:RadButton>

    C#:

    protected void Page_Load(object sender, EventArgs e)
            {
                if (IsPostBack)
                    DemoLabel.Text = Request["__EVENTARGUMENT"].ToString();
                 
            }

    Thanks,
    Velkumar.
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 15 Mar 2012 Link to this post

    Hello Velkumar,

    Please add a setting in the RadAjaxManager in which the RadPanelBar updates the Label. Give this a try and let me know if this makes any deference.

    Regards,
    Maria Ilieva
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Velkumar
    Velkumar avatar
    85 posts
    Member since:
    Apr 2011

    Posted 16 Mar 2012 Link to this post

    Hi,

       It also does not  work in RadAjaxManager.

    Thanks
    Velkumar.
  5. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 16 Mar 2012 Link to this post

    Hi Velkumar,

    Note that the RadPanel item value should be accessed by using the get_text() client method instead of get_value(). Also note that if you need to update control on ajaxRequest you should have a setting in the RadAjaxManager updates that control.
    Find attached a small runnable application which shows this requirements and works correctly on my end. Test it locally and verify if this is what you need to achieve.

    Greetings,
    Maria Ilieva
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top