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
| <telerik:GridTemplateColumn UniqueName="infos" DataField="id" HeaderText="Infos"> |
| <ItemTemplate> |
| Brand: <%#Eval("brandId")%> |
| <%=BrandDDL.Items[0].Text%> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| <telerik:GridTemplateColumn UniqueName="infos" DataField="id" HeaderText="Infos"> |
| <ItemTemplate> |
| Brand: <%#Eval("brandId")%> |
| <%=BrandDDL.Items[(int)Eval("brandId")].Text%> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
<
telerik:RadGrid ID="RadGrid1" OnNeedDataSource="RadGrid1_NeedDataSource" DataSourceID="SqlDataSource1" OnItemDataBound="RadGrid1_OnItemDataBound" runat="server"
Width="70%" >
<MasterTableView AutoGenerateColumns="False" DataKeyNames="BusinessEntityId" DataSourceID="SqlDataSource1" >
<RowIndicatorColumn>
<HeaderStyle Width="20px" />
</RowIndicatorColumn>
<ExpandCollapseColumn>
<HeaderStyle Width="20px" />
</ExpandCollapseColumn>
<Columns>
<telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditColumn" meta:resourcekey="EditColumn">
<HeaderStyle Width="20px" />
</telerik:GridEditCommandColumn>
<telerik:GridButtonColumn ButtonType="ImageButton" UniqueName="DeleteColumn" CommandName="Delete"
ConfirmText="Are you sure you want delete the selected Officer?" ConfirmDialogType="Classic" ConfirmTitle="Delete Officer?"
meta:resourcekey="DeleteColumn">
<HeaderStyle Width="20px" />
</telerik:GridButtonColumn>
<telerik:GridBoundColumn DataField="BusinessEntityID"
DefaultInsertValue="" HeaderText="BusinessEntityID"
SortExpression="BusinessEntityID" UniqueName="BusinessEntityID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="FirstName"
DefaultInsertValue="" HeaderText="FirstName"
SortExpression="FirstName" UniqueName="FirstName">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="QueueItemNumber" DefaultInsertValue=""
HeaderText="QueueItemNumber" SortExpression="QueueItemNumber"
UniqueName="QueueItemNumber">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="MadePreviousQINumber" DefaultInsertValue=""
HeaderText="MadePreviousQINumber" SortExpression="MadePreviousQINumber"
UniqueName="MadePreviousQINumber"></telerik:GridBoundColumn>
<telerik:GridCheckBoxColumn UniqueName="IsPrevious"
HeaderText="Previous" DataField="IsPrevious" HeaderStyle-Width="40px" SortExpression="IsPrevious"
DataType="System.Boolean" AllowFiltering="true" />
</Columns>
</MasterTableView>
</telerik:RadGrid>
| <telerik:RadDataPager Skin="Default" AllowSEOPaging="true" SEOPagingQueryPageKey="page" Font-Bold="false" |
| BackColor="#FFFFFF" BorderColor="#FFFFFF" ID="RadDataPager1" runat="server" PagedControlID="RadListView1" |
| PageSize="12"> |
| <Fields> |
| <telerik:RadDataPagerButtonField FieldType="FirstPrev" /> |
| <telerik:RadDataPagerButtonField FieldType="Numeric" /> |
| <telerik:RadDataPagerButtonField FieldType="NextLast" /> |
| <telerik:RadDataPagerTemplatePageField> |
| <PagerTemplate> |
| <div style="float: right; text-align: right; font-family: Arial;"> |
| <b>Products |
| <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex+1%>" /> |
| to |
| <asp:Label runat="server" ID="TotalPagesLabel" Text="<%# Container.Owner.StartRowIndex+Container.Owner.PageSize %>" /> |
| of |
| <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount%>" /> |
| <br /> |
| </b> |
| </div> |
| </PagerTemplate> |
| </telerik:RadDataPagerTemplatePageField> |
| </Fields> |
| </telerik:RadDataPager> |
<
telerik:RadComboBox ID="ddlEmpType" runat="server" Skin="Vista" EmptyMessage="Select Employment Type"
DataTextField="EmpTypeName" DataValueField="EmpTypeCode" Width="125px">
<CollapseAnimation Duration="200" Type="OutQuint" />
</telerik:RadComboBox>
Could we know a solution to this problem.
cheers,
Thanks and Regards,
Sriharsha.
| <telerik:RadWindow ID="popupWindow" runat="server" Width="500px" Height="400px" VisibleStatusbar="false" Modal="false" Animation="Fade" Behaviors="Close, Move, Resize" Skin="Sitefinity" Autosize="true"> |