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

User Interface using RADAJAXPanel

3 Answers 17 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
celerity12
Top achievements
Rank 1
celerity12 asked on 27 Jun 2013, 02:02 PM
Please look into the below code snippet. Here I have RADAjaxPanels, splitter and some asp web controls.

Program compiles well, at runtime it goes into code behind execute all the code (in debug mode confirmed this) although
the issue i am having is the line of code gets executed it doesn't change Label color to red neither populates the Label with intended value.

ASP file code snippet

<!-- For Ajax Code Block -->
<telerik:RadCodeBlock ID="RadCodeBlockLeftPane" runat="server">
    <script type="text/javascript">
        function invokeAjaxrequestLeftPane() {
            $find("<%= RadAjaxPanelLeftPane.ClientID%>").ajaxRequestWithTarget("<%= RadAjaxPanelLeftPane.UniqueID %>", "LoadDocumentFromLibrary");
        }
    </script>
</telerik:RadCodeBlock>
 
<telerik:RadSplitter ID="RadSplitterForPanel" runat="server" Height="1300" Width="100%" EnableViewState="false">
 
        <telerik:RadPane ID="PaneLeft" runat="server" Height="100%" Width="60%" Scrolling="Y">
 
            <asp:Label ID="LabelTest" runat="server" Text="Left Panel">
                   Left Pane
            </asp:Label>
 
            <input type="button" value="Load Document" onclick="invokeAjaxrequestLeftPane();" />
 
            <telerik:RadAjaxPanel ID="RadAjaxPanelLeftPane" runat="server" OnAjaxRequest="RadAjaxPanelLeftPane_AjaxRequest">
 
            </telerik:RadAjaxPanel>
 
        </telerik:RadPane>
         
        <telerik:RadSplitBar ID="RadSplitbarForPane" runat="server" CollapseMode="Both">
        </telerik:RadSplitBar>
 
        <telerik:RadPane ID="PaneRight" runat="server" Height="100%" Width="40%">
            Right Pane
 
        </telerik:RadPane>
 
 
    </telerik:RadSplitter

Code Behind file method
/// <summary>
        /// Ajax panel for loading the document from the library
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void RadAjaxPanelLeftPane_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            switch (e.Argument)
            {
                case "LoadDocumentFromLibrary":
                    LabelTest.Text = " I am clicked at " + System.DateTime.Now;
                    LabelTest.BackColor = System.Drawing.Color.Red;
                    break;
                default:
                    break;
            }//switch
        }//RadAjaxPanelLeftPane_AjaxRequest

Thanks, Amit

3 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 02 Jul 2013, 12:20 PM
Hi Amit,

Please note that Ajax requests made by Ajax panels update only the controls inside the panel itself. Therefore, the label should be inside the RadAjaxPanel.

Hope the clarification was helpful. Please make the suggested modification and let us know about the result.

Regards,
Eyup
Telerik
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 the blog feed now.
0
celerity12
Top achievements
Rank 1
answered on 16 Aug 2013, 10:16 PM
Yeah, i was not using label.

The problem was either the RadGrid.Rebind() or needdatasource eventhandler needs to be utilized for radgrid to display data in this scenario.


0
Eyup
Telerik team
answered on 21 Aug 2013, 07:20 AM
Hi Amit,

I am glad that the issue was resolved. However, I do not see any RadGrid in the code snippets provided in your original post. If you need further assistance, please elaborate on your specific scenario.

Regards,
Eyup
Telerik
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 the blog feed now.
Tags
PanelBar
Asked by
celerity12
Top achievements
Rank 1
Answers by
Eyup
Telerik team
celerity12
Top achievements
Rank 1
Share this question
or