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

Rebinding RadComboBox and CheckBoxList on RadWindow Closing

3 Answers 213 Views
Window
This is a migrated thread and some comments may be shown as answers.
Yuji
Top achievements
Rank 1
Yuji asked on 22 Jan 2010, 12:51 AM
Hi,
I want to rebind my RadComboBox and my CheckBoxList once the RadWindow had been closed. I have this javascript that runs on the OnClientClose event of RadWindow:

function closeRadwindow() {
            $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest();
        }



This script invoke an ajaxRequest() in the OnClientclose event handler. Then in the Event handler rebind the radcombobox.

Private Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest
        ddClient.DataBind()
        chckSoftware.DataBind()
    End Sub

But I can't still rebind my RadComboBox and CheckBoxList. Any suggestion/help will be greatly appreciated.

Thanks!

3 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 22 Jan 2010, 09:56 AM
Hello,

Have you set the Ajax settings as shown below?

ASPX:
 
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="ddClient" /> 
                <telerik:AjaxUpdatedControl ControlID="chckSoftware" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManager> 

-Shinu.
0
Henrik Tegman
Top achievements
Rank 1
answered on 26 Jan 2011, 11:48 AM
I have a very similar problem. But more complex.

I have a RadAjaxManager on my Default.aspx, then I have a Grid in a ascx, I also have a seperate ascx for the editform. In this editform I have a ascx that consist of a RadComboBox and a button, the button opens up a RadWindow with a aspx that has a ascx. When that window closes I want to update the RadComboBox.

Since I already have a RadAjaxManager in my mainpage and the RadComboBox is in a ascx I understand that I should use a RadAjaxManagerProxy, when I try use that and use the sample code I found with :

$find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("content");

I still get an error:

Compiler Error Message: CS1061: 'Telerik.Web.UI.RadAjaxManagerProxy' does not contain a definition for 'GetCurrent' and no extension method 'GetCurrent' accepting a first argument of type 'Telerik.Web.UI.RadAjaxManagerProxy' could be found (are you missing a using directive or an assembly reference?)

So what should I have there instead of Page?

But more or less what I want todo is the same as the above poster, I have a RadWindow that closes and I want to update a RadComboBox (databind it) when that happends.
0
Georgi Tunev
Telerik team
answered on 31 Jan 2011, 11:06 AM
Hello Henrik,

What is the ID of your RadAjaxManagerProxy control? From the error it looks like it is "RadAjaxManager" - you are trying to access the real RadAjaxManager, but you get an error from the proxy.
If this is the case, please change the ID of the proxy and the code should work as expected.
If this doesn't help, please open a support ticket and send us a sample project that reproduces the case so we can check it.

Kind regards,
Georgi Tunev
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Window
Asked by
Yuji
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Henrik Tegman
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or