PDA

View Full Version : [CLOSED] Postback does not send combobox's selected value



Maitreya
Sep 25, 2014, 3:53 PM
Hi,

We have a tabbed form in ASP.NET MVP site. We are facing an issue where if I click on a button on the tabbed form then combobox does not retain its selected value. The combobox is in a tab (ext:Container). However, if I view the tab once and then click on the same button then combobox's selected value (of the same tab) is retained.

I am not able to provide you an example easily but do you know if this is a known issue or have a workaround for this?

Thanks.

Daniil
Sep 26, 2014, 9:38 AM
Hi @Maitreya,

Be default, a tab is being rendered on the first activation. So, if the tab with the ComboBox is not opened yet, it means that ComboBox is not rendered. Therefore, it is not submitted with POST.

A possible solution could be setting DeferredRender="false" for the TabPanel.
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.tab.Panel-cfg-deferredRender

Maitreya
Sep 26, 2014, 10:45 AM
Many thanks, Daniil. DeferredRender="false" did the trick.

Is it possible to apply it on individual tab (ext:Container) instead of applying on TabPanel?



<ext:TabPanel ID="Pages" runat="server" TabMenuHidden="true" Border="true" Header="false" Plain="true" Layout="Anchor"
HideBorders="true" Region="Center" LayoutOnTabChange="true" AnchorHorizontal="99%" AutoScroll="true"
DeferredRender="false">
<Items>
<ext:Container ID="tab1" runat="server" Border="false" Layout="FitLayout" Hidden="true">
<Content>
<sds:AcctInfo ID="ctrl1" runat="server" />
</Content>
</ext:Container>
<ext:Container ID="tab2" runat="server" Border="false" Layout="FitLayout" Hidden="true">
<Content>
<sds:AccRestriction ID="ctrl2" runat="server" />
</Content>
</ext:Container>
</Items>
</ext:TabPanel>

Daniil
Sep 26, 2014, 12:07 PM
Unfortunately, there is no such the possibility in API.