DevExpress controls in Sitecore not posting back -


i'm having issues getting devexpress controls working in sitecore (7.5). i've verified issue using controls in sitecore using same code in aspx page outside sitecore solution (but in same iis site).

the issue on postback of devexpress combobox control, not getting selected values. i've tried following;

added web.config:

<rendering>     <typesthatshouldnotbeexpanded>         <type>devexpress.web</type>     </typesthatshouldnotbeexpanded> </rendering> 

also tried adding dxr.axd sitecore "ignoreurlprefixes" setting in web.config. have tried setting enablecallbackmode="false" on devex control.

this test code used, worked in normal aspx page, not part of sublayout.

aspx:

<%@ register assembly="devexpress.web.v14.2, version=14.2.3.0, culture=neutral, publickeytoken=b88d1754d700e49a" namespace="devexpress.web" tagprefix="dx" %> <%@ register tagprefix="sc" namespace="sitecore.web.ui.webcontrols" assembly="sitecore.kernel" %>  <dx:aspxpopupcontrol id="aspxpopupcontrol1" runat="server" showonpageload="true">     <contentcollection>         <dx:popupcontrolcontentcontrol>             <dx:aspxformlayout id="aspxformlayout1" runat="server">                 <items>                     <dx:layoutgroup caption="testing">                         <items>                             <dx:layoutitem>                                 <layoutitemnestedcontrolcollection>                                     <dx:layoutitemnestedcontrolcontainer>                                         <dx:aspxlabel runat="server" text="aspxlabel" associatedcontrolid="combobox"></dx:aspxlabel>                                         <dx:aspxcombobox id="aspxcomboboxloja" runat="server" cssfilepath="~/app_themes/devex/{0}/styles.css"                                             csspostfix="devex" valuefield="codigo" spritecssfilepath="~/app_themes/devex/{0}/sprite.css"                                             valuetype="system.guid" clientidmode="autoid" spacing="0" enablecallbackmode="false">                                             <loadingpanelimage url="~/app_themes/devex/editors/loading.gif">                                             </loadingpanelimage>                                             <columns>                                                 <dx:listboxcolumn caption="loja" fieldname="nome" />                                             </columns>                                             <loadingpanelstyle imagespacing="5px">                                             </loadingpanelstyle>                                         </dx:aspxcombobox>                                     </dx:layoutitemnestedcontrolcontainer>                                 </layoutitemnestedcontrolcollection>                             </dx:layoutitem>                         </items>                     </dx:layoutgroup>                     <dx:layoutitem>                         <layoutitemnestedcontrolcollection>                             <dx:layoutitemnestedcontrolcontainer>                                 <dx:aspxbutton runat="server" text="aspxbutton" onclick="button_click"></dx:aspxbutton>                             </dx:layoutitemnestedcontrolcontainer>                         </layoutitemnestedcontrolcollection>                     </dx:layoutitem>                 </items>             </dx:aspxformlayout>             <asp:literal text="" runat="server" id="output" />         </dx:popupcontrolcontentcontrol>     </contentcollection> </dx:aspxpopupcontrol> 

cs:

protected void page_load(object sender, eventargs e)         {             aspxcomboboxloja.datasource = createrightlistdatasource();             aspxcomboboxloja.databind();         }          private ienumerable createrightlistdatasource()         {             (int = 0; < 100; i++)             {                 yield return new { codigo = guid.newguid(), nome = "nome " + };             }          }          protected void button_click(object sender, eventargs e)         {             string retval = aspxcomboboxloja.value.tostring();             output.text = retval;         } 

an error occurs on button click trying retrieve value. null (as selected item). error on screen / in sitecore logs:

exception: system.nullreferenceexception message: object reference not set instance of object.

any experience getting devexpress controls working in sitecore? i'm sure doing daft.

much appreciated.

not entirely sure, feels .net event cycle issue postbacks.you rebinding datasource on every page load, postbacks. mess view state. have tried wrapping databinding if(!ispostback)?

edit: noted generating new guid each time render page. i'm not sure codigo is, first load have different guid on postback.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -