Note that there are some explanatory texts on larger screens.

plurals
  1. POI can't access ASPxComboBox component when it is in both ASPxPageControl tab pages
    text
    copied!<p>I can't access ASPxComboBox component when it is in ASPxPageControl both tab pages. So I have this function added to ClientSideEvents with string.Format:</p> <pre><code>function(s, e) {{ if (window['{1}']) {{ {0}.SetSelectedItem( {0}.FindItemByText( {2}.GetText() ) ); {0}.Focus(); {3}.PerformCallback( {0}.GetSelectedItem().value ); }} }} </code></pre> <p>And firing this function first at one tab page then at other page, I get error:</p> <pre><code>Microsoft JScript runtime error: Unable to get value of the property 'SetSelectedItem': object is null or undefined </code></pre> <p>Why is it that way? Could I somehow access that combobox after switching tabs?<br> Btw, ASPxPopupControl apears on both tabs then opened..</p> <p>More context:</p> <pre><code>0 is ASPxClientControl.GetControlCollection().Get('&lt;%=ASPxComboBox_Views.ClientID%&gt;'), (compiles to ctl00_ctl00_ASPxSplitter_Main_ContentPlaceHolderMain_ContentProgramMain_ASPxRoundPanelMain_ASPxPageControl_Main_ASPxCallbackPanel_Redagavimas_ASPxCallbackPanel_RedagavimasGrid_GridLayout_Redagavimas_ASPxPopupControl_Layout_ASPxCallbackPanel_Views_ASPxComboBox_Views ) 1 is ASPxClientControl.GetControlCollection().Get('&lt;%=ASPxComboBox_Views.ClientInstanceName%&gt;'), (compiles to cbViews ) 2 is ASPxClientControl.GetControlCollection().Get('&lt;%=GetClientStr(ASPxHyperLink_Desc.ClientID%&gt;'), (compiles to ctl00_ctl00_ASPxSplitter_Main_ContentPlaceHolderMain_ContentProgramMain_ASPxRoundPanelMain_ASPxPageControl_Main_ASPxCallbackPanel_Redagavimas_ASPxCallbackPanel_RedagavimasGrid_GridLayout_Redagavimas_ASPxHyperLink_Desc ) 3 is ASPxClientControl.GetControlCollection().Get('&lt;%=ASPxCallbackPanel_Menu.ClientID%&gt;'), (compiles to ctl00_ctl00_ASPxSplitter_Main_ContentPlaceHolderMain_ContentProgramMain_ASPxRoundPanelMain_ASPxPageControl_Main_ASPxCallbackPanel_Redagavimas_ASPxCallbackPanel_RedagavimasGrid_GridLayout_Redagavimas_ASPxPopupControl_Layout_ASPxCallbackPanel_Menu ) </code></pre> <p>And it doesn't work if ASPxComboBox_Views is in ASPxPageControl tab. To be precise, my page looks like this:</p> <pre><code>&lt;..&gt; &lt;dx:ASPxPageControl ID="ASPxPageControl_Main"&gt; &lt;TabPages&gt; &lt;dx:TabPage&gt;&lt;..&gt; &lt;dx:ASPxGridView ID="ASPxGridView_Naudojimas"&gt; //From here starts partial page which is one for both tabpages &lt;dx:ASPxPopupControl ID="ASPxPopupControl_Layout"&gt; &lt;ContentCollection&gt; &lt;dx:PopupControlContentControl ID="PopupControlContentControl_Layout"&gt; &lt;div&gt;&lt;table&gt;&lt;tr&gt;&lt;td align="left" width="100%"&gt; &lt;dx:ASPxCallbackPanel ID="ASPxCallbackPanel_Views"&gt; &lt;PanelCollection&gt; &lt;dx:PanelContent ID="PanelContent1"&gt; &lt;dx:ASPxComboBox ID="ASPxComboBox_Views" runat="server" ...&gt; &lt;/dx:TabPage&gt; &lt;dx:TabPage&gt;&lt;..&gt; &lt;dx:ASPxGridView ID="ASPxGridView_Redagavimas"&gt; //From here starts partial page which is one for both tabpages &lt;dx:ASPxPopupControl ID="ASPxPopupControl_Layout"&gt; &lt;ContentCollection&gt; &lt;dx:PopupControlContentControl ID="PopupControlContentControl_Layout"&gt; &lt;div&gt;&lt;table&gt;&lt;tr&gt;&lt;td align="left" width="100%"&gt; &lt;dx:ASPxCallbackPanel ID="ASPxCallbackPanel_Views"&gt; &lt;PanelCollection&gt; &lt;dx:PanelContent ID="PanelContent1"&gt; &lt;dx:ASPxComboBox ID="ASPxComboBox_Views" runat="server" TextField="Description" ValueField="FullName" ClientInstanceName="cbViews" TextFormatString="{0}"&gt; (deleted some properties just to be easier to read here) </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload