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

Ajax Manager executing Code behind but not updating display

8 Answers 175 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 26 Jan 2009, 04:26 PM
When the user clicks a table cell I call this function

function Cell_onclick(arg)
{
var ajaxManager = <%= RadAjaxManager1.ClientID %>;
   ajaxManager.AjaxRequest(arg);
}

That script puts me into the code behind and executes the code below

Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.WebControls.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest

        Label2.Text = e.Argument

    End Sub

I can debug through the application and hit the ajax request but the Label text doesnt change. What am I missing?

8 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 28 Jan 2009, 11:08 AM
Hello Mark,

I assume you don't have proper RadAjaxManager settings. You should set RadAjaxManager as initiator and Label control as updated control in your RadAjaxManager. Thus your label will be updated when request is initiated from RadAjaxManager i.e. ajaxManager.AjaxRequest(arg);

All the best,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Mark
Top achievements
Rank 1
answered on 28 Jan 2009, 03:46 PM
Thanks for the response, I looked through the other forums and finally figured out that the cell wasnt sending the action, the manager was. Now the manager is updating the panel correctly but I also have a RAD GRID that needs to be updated when the same cell is clicked. Can one manger update multiple controls? When I step through the code it looks like the grid should get updated but its not. The grid is supposed to be displaying the files found in the folder that I selected.
0
Nikolay Rusev
Telerik team
answered on 02 Feb 2009, 03:00 PM
Hello Mark,

RadAjaxManager.UpdatedControls property is collection of AjaxUpdatedControl. You can specify multiple controls to be updated on one initiator.

Sincerely yours,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Mark
Top achievements
Rank 1
answered on 02 Feb 2009, 03:23 PM
I've got the Grid included and I can step through the code but it never updates.

    <radA:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <radA:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <radA:AjaxUpdatedControl ControlID="RadAjaxPanel1" />
                    <radA:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </radA:AjaxSetting>
        </AjaxSettings>
    </radA:RadAjaxManager>
0
Nikolay Rusev
Telerik team
answered on 03 Feb 2009, 07:52 AM
Hi Mark,

Please find the attached application which demonstrates sample scenario of using RadAjax.
You can also use for reference the following links:
RadAjax demos
RadAjax documentation

Regards,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Mark
Top achievements
Rank 1
answered on 03 Feb 2009, 04:31 PM
I'm not sure what I am missing here, I added a loading panel for the RadGrid and it shows loading but doesnt update the grid. I also changed the asp code to look like your example. I can debug through the application and see the changes being applied to the grid by the ajax manager but they arent showing up. I know this seems fairly simple but Can you be more specific? Thanks for the help.

<radA:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <radA:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <radA:AjaxUpdatedControl ControlID="RadAjaxPanel1">
                    </radA:AjaxUpdatedControl>
                    <radA:AjaxUpdatedControl ControlID="RadGrid1"
                    LoadingPanelID="AjaxLoadingPanel1">
                    </radA:AjaxUpdatedControl>
                </UpdatedControls>
            </radA:AjaxSetting>
        </AjaxSettings>
    </radA:RadAjaxManager>



0
Mark
Top achievements
Rank 1
answered on 04 Feb 2009, 04:09 PM
Had to bind the grid again after I updated the datasource. Works now
0
Nikolay Rusev
Telerik team
answered on 05 Feb 2009, 12:30 PM
Hello Mark,

I'm glad to hear that It works.
You can use the links which I pointed you as reference of RadAjax API.

Regards,
Nikolay
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Mark
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Mark
Top achievements
Rank 1
Share this question
or