I have an ASPxPopupControl and an ASPxGridView.
Inside this PopupControl i have my own usercontrol which contains a form for editing person information.
Inside the GridView is a list with different persons.
When i select a different person in the gridview i want the content of the popupcontrol to update for the to the person information of the selected user so i can edit it.
My problem is; i can’t get this to work, i have tried placing update panels with all sorts of triggers or forcing the updatepanel to update. But it still doesn’t work.
PopupControl:
<dx:ASPxPopupControl ID="pcVolgnummerToevoegen" runat="server" AllowDragging="True" ClientInstanceName="popup_toevoegen" CloseAction="CloseButton" LoadingPanelText="Laden&hellip;" Height="700" Width="700" Modal="True" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter">
<ContentCollection>
<dx:PopupControlContentControl ID="pcVolgnummerToevoegenContent" runat="server">
<asp:UpdatePanel ID="upnlToevoegen" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<uc:GegevensControl ID="ucGegevensControl_Toevoegen" runat="server" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="KlantVolgnummerGrid" />
</Triggers>
</asp:UpdatePanel>
</dx:PopupControlContentControl>
</ContentCollection>
</dx:ASPxPopupControl>
DataView Selection_Changed:
protected void KlantVolgnummerGrid_SelectionChanged(object sender, EventArgs e)
{
Session["Person_Id"] = KlantVolgnummerGrid.GetSelectedFieldValues("ID");
}
Page_Load of the usercontrol inside the popup
protected void Page_Load(object sender, EventArgs e)
{
Person varPerson = PersonControllerClient.GetPerson(Session["Person_Id"]);
....Code that fills the form
}
I have checked the SelectionChanged event of the GridView, it triggers. But the update panel doesn’t update.
After i refresh the page the person i have selected is shown inside the popup.
Is there anyway i can update the popup for showing the right person without having to refresh the page everytime i select a different person?
Disable a ASPxGridView callback mode to force grid using UpdatePanel callbacks.
Just set the ASPxGridView.EnableCallBack http://documentation.devexpress.com/#AspNet/DevExpressWebASPxGridViewASPxGridView_EnableCallBackstopic property to “false”.