Hello!
I have two "linked" comboboxes - Area (ddlArea) and Region (ddlRegion). When Area selection is changed, Region items need to be updated accordingly. Both comboboxes have "EnableAutomaticLoadOnDemand" set to true. I have a java-script handler assigned to OnClientSelectedIndexChanged of ddlArea combobox to avoid post back, because this is all done is a "colorbox" modal window, which needs to be reopened after each post-back.
On the server side, in ItemsRequested handler I'm able to determine which value has been selected by processing "Text" property. of event arguments. However, with automatic LoadOnDemand feature enabled, binding needs to occur also on every post back, inside Page_Load method. But when I set a breakpoint inside Page_Load, I see that ddlArea.SelectedValue has it's old value and not the one that was just selected. ddlArea.SelectedValue becomes updated only after post-back from a button for example.
Could you please advise what's the best solution for my problem would be?
Thank you!
I have two "linked" comboboxes - Area (ddlArea) and Region (ddlRegion). When Area selection is changed, Region items need to be updated accordingly. Both comboboxes have "EnableAutomaticLoadOnDemand" set to true. I have a java-script handler assigned to OnClientSelectedIndexChanged of ddlArea combobox to avoid post back, because this is all done is a "colorbox" modal window, which needs to be reopened after each post-back.
function
requestData(sender, eventArgs) {
var
ddlRegion = $find(
"<%=ddlRegion.ClientID %>"
);
ddlRegion.requestItems(sender.get_value(),
false
);
}
On the server side, in ItemsRequested handler I'm able to determine which value has been selected by processing "Text" property. of event arguments. However, with automatic LoadOnDemand feature enabled, binding needs to occur also on every post back, inside Page_Load method. But when I set a breakpoint inside Page_Load, I see that ddlArea.SelectedValue has it's old value and not the one that was just selected. ddlArea.SelectedValue becomes updated only after post-back from a button for example.
Could you please advise what's the best solution for my problem would be?
Thank you!