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

RadPanelBar with AjaxmanagerProxy PostBack Problem

3 Answers 69 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Velkumar
Top achievements
Rank 2
Velkumar asked on 12 Mar 2012, 01:15 PM
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.

3 Answers, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 15 Mar 2012, 11:29 AM
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.
0
Velkumar
Top achievements
Rank 2
answered on 16 Mar 2012, 05:54 AM
Hi,

   It also does not  work in RadAjaxManager.

Thanks
Velkumar.
0
Maria Ilieva
Telerik team
answered on 16 Mar 2012, 02:21 PM
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.
Tags
Ajax
Asked by
Velkumar
Top achievements
Rank 2
Answers by
Maria Ilieva
Telerik team
Velkumar
Top achievements
Rank 2
Share this question
or