Good day,
I have a FormView which contains a user control. The FormView is linked to an ObjectDataSource and the user control uses Eval and Bind to display the data - no problems there. The FormView is updated fine.
<asp:FormView ID="frmvFirst"
runat="server"
DataSourceID="odsFirst"
AllowPaging="True"
DataKeyNames="ID"
OnPageIndexChanged="frmvFirst_PageIndexChanged" >
I also have a second FormView that contains a second user control bound to a second ObjectDataSource. This second ObjectDataSource is configured with a ControlParameter which gets the DataKey from the first. More or less a Master-Detail with two FormViews.
<asp:ControlParameter ControlID="frmvFirst"
ConvertEmptyStringToNull="false"
Name="FirstFormIDToBePassedToTheSecondODS"
PropertyName="SelectedValue"
Type="Object" />
My issue starts when I click a pager control on the first FormView. I expected to see the second ODS get the new value from the First ODS and re-select for the second ODS using the SelectedValue (ID). What appears to be happening is the SelectedValue is not changed until after the page is completely loaded. If I click a button causing a post back AFTER the page is fully displayed, the second ODS is properly selected.
I've checked the SelectedValue property in all the events I could plug in there and it remains unchanged from the initial value until the manual postback.
Any tips or workarounds would be appreciated.
Thank you,
Mike Q
I have a FormView which contains a user control. The FormView is linked to an ObjectDataSource and the user control uses Eval and Bind to display the data - no problems there. The FormView is updated fine.
<asp:FormView ID="frmvFirst"
runat="server"
DataSourceID="odsFirst"
AllowPaging="True"
DataKeyNames="ID"
OnPageIndexChanged="frmvFirst_PageIndexChanged" >
I also have a second FormView that contains a second user control bound to a second ObjectDataSource. This second ObjectDataSource is configured with a ControlParameter which gets the DataKey from the first. More or less a Master-Detail with two FormViews.
<asp:ControlParameter ControlID="frmvFirst"
ConvertEmptyStringToNull="false"
Name="FirstFormIDToBePassedToTheSecondODS"
PropertyName="SelectedValue"
Type="Object" />
My issue starts when I click a pager control on the first FormView. I expected to see the second ODS get the new value from the First ODS and re-select for the second ODS using the SelectedValue (ID). What appears to be happening is the SelectedValue is not changed until after the page is completely loaded. If I click a button causing a post back AFTER the page is fully displayed, the second ODS is properly selected.
I've checked the SelectedValue property in all the events I could plug in there and it remains unchanged from the initial value until the manual postback.
Any tips or workarounds would be appreciated.
Thank you,
Mike Q