On a webpage I am adding RadpanelItems with user controls dynamically. One user control is added multiple times. On a user control there is a hyperlink which opens a radpop up window to select a financial institution user selects a financial institution. After clicking submit button on this pop up should set text boxes and labels on a user control. I know how to do this and I implemented according to example.
I have radAjaxproxymanager on a user control. The problem is since I have multiple user controls on a page inside panel bar and one of them is going start ajax request. But submit button click on pop up window by default sending postback to the parent page ( on which user controls reside) I am getting confused How to update the only one user control on which hyper link was clicked. Following is my code.
This is the code on user control ascx page.
<telerik:RadAjaxManagerProxy runat="server" ID="RadAjaxManagerProxy1">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="hyperlinkChangeFI">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="lblFINameText" />
<telerik:AjaxUpdatedControl ControlID="txtWebsite" />
<telerik:AjaxUpdatedControl ControlID="txtPhoneNumber" />
<telerik:AjaxUpdatedControl ControlID="hdnFIId" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManagerProxy>
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
function refreshPage(arg) {
var Ajax = $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>")
if (Ajax) {
Ajax.ajaxRequest("Rebind"); // Invoking ajaxRequest
}
}
</script>
</telerik:RadCodeBlock>
This is the event on the usercontrol ( for each user control this event is fired after clicking submit button on a pop up how to get handle of the usercontrol on which hyperlink was clicked?)
Private Sub Manager_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs)
If e.Argument = "Rebind" Then
If Session("SelectedInstitution") IsNot Nothing Then
Dim SelectedInstitution As Institution = DirectCast(Session("SelectedInstitution"), Institution)
With SelectedInstitution
lblFINameText.Text = .Name
txtWebsite.Text = .WebsiteUrl
txtPhoneNumber.Text = .CustomerServicePhone
hdnFIId.Value = .Id.ToString
Session("SelectedInstitution") = Nothing
End With
End If
End If
End Sub