Telerik control events always being triggered - telerik

I'm using the Telerik combo box to create cascading multi-select drop down lists.
I have several drop down lists on the page ddlProject, ddlUnit, ddlDiscipline, ddlDocType.
I am using the Telerik RadAjaxManager to trigger the updates of the controls and the markup of this is as follows:
<telerik:RadAjaxManager ID="ajaxManager" runat="server" DefaultLoadingPanelID="lpnlLoading" >
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="ddlProject" EventName="TextChanged">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="ddlUnit" UpdatePanelRenderMode="Inline"/>
<telerik:AjaxUpdatedControl ControlID="ddlDiscipline" UpdatePanelRenderMode="Inline" />
<telerik:AjaxUpdatedControl ControlID="ddlDocType" UpdatePanelRenderMode="Inline" />
<telerik:AjaxUpdatedControl ControlID="ddlPhase" UpdatePanelRenderMode="Inline" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="ddlUnit" EventName="TextChanged" >
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="ddlDocType" UpdatePanelRenderMode="Inline" />
</UpdatedControls>
</telerik:AjaxSetting>
<telerik:AjaxSetting AjaxControlID="ddlDiscipline" EventName="TextChanged">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="ddlDocType" UpdatePanelRenderMode="Inline" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
ddlProject updates ddlUnit, ddlDiscipline and ddlDocType.
ddlUnit and ddlDiscipline are only meant to update ddlDocType but I am finding that the TextChanged event is being fired when either of these controls is changed.
I've tried commenting out the Ajax Manager to see if ddlProject_TextChanged is being called and it's not, only when the Ajax Manager is on the page. I would like the Ajax Manager to be enabled to suppress the page postbacks plus it displays a loading panel for each of the comb boxes which I think gives good user experience showing when they are loading.
All this is within a user control because I want to use it on multiple pages.
Can someone please help with a solution to stop ddlProject_TextChanged being fired when unit and discipline are changed?
Thanks in advance
Andy
Edit:
I've just discovered that it might not be the AjaxManager. The control events seem to be getting fired every time the page does a post back. I also have a standard ASP.NET button which on click does not databind to any of the checkboxes, it just processes the selected values in the user control. It's even external to the user control which contains the combo boxes.
Combobox structure:
<telerik:RadComboBox ID="ddlUnit" runat="server" CheckBoxes="true" EnableCheckAllItemsCheckBox="true"
MaxHeight="450px" Width="300px" DataTextField="Value" DataValueField="Key" Label="Unit:"
LabelCssClass="HeaderLabel" DropDownWidth="600px" Height="400px"
AutoPostBack="true" OnTextChanged="ddlUnit_TextChanged">
</telerik:RadComboBox>
TextChanged event
protected void ddlDiscipline_TextChanged(object sender, EventArgs e)
{
CTRmDataService ctrmDS = new CTRmDataService();
this.ddlDocType.DataSource = ctrmDS.GetDocumentTypesForProjectsDisciplineAndUnit(GetSelectedProjects(),
GetSelectedDisciplines(),
GetSelectedUnits(),
LoggedOnUser.Id);
this.ddlDocType.DataBind();
}

I've just been informed by Telerik that this is a bug and has been passed over to their development team.
Not necessarily a working answer but explains why I'm having the problems.

Not sure this will help at all but in our instance the issue was down to the IIS server caching content that has an adverse effect on Telerik controls. It only became apparent to us when we switched out web.config settings from debug="true" to debug="false" as this then allowed IIS to enable its caching and other related optimizations, turning all caching off in the browser for some reason still broke the controls, however turning it off in IIS or turning it back onto debug mode solved it.

Related

Session get lost even if I am interacting on page

I'm working with primefaces 3.4.2 Javax.faces 2.1.9
My web.xml
<session-config>
<session-timeout>45</session-timeout>
</session-config>
<p:idleMonitor id="idMonitorSession" timeout="2400000"
onidle="dlgMensajeSessionExp.show()" />
<p:dialog header="Sesion Ended" resizable="false"
widgetVar="dlgMensajeSessionExp" width="300" height="120"
modal="true" closable="false" appendToBody="true">
<center>
<h:outputText value="Session Ended" />
<h:form id="sessionForm">
<h:commandLink actionListener="#{user.exit()}">
<h:graphicImage style="border:0px" value="/resources/images/login.png"
width="80px" />
</h:commandLink>
</h:form>
</center>
</p:dialog>
However session get lost even if i am working in the pages, do you have any idea why is this happening,
Web Server is Websphere 7.0.0.17
Interacting with the page in such a way that the server isn't invoked via ajax or a complete form post doesn't reset the timeout against the session server side. Using ajax events for the idleMonitor should do the trick.
<p:idleMonitor id="idMonitorSession" timeout="2400000"
onidle="dlgMensajeSessionExp.show()">
<p:ajax event="active"/>
</p:idleMonitor>
Edit: I noticed the "active" event doesn't fire when the mouse is moved, the user will be required to interact with the page enough to trigger this event. If it is critical to keep the server synced with the page, ajax invocations will be required more often than this event will create. You don't have to necessarily invoke a noop action on the server side, setting the event type is enough.
Another possibility is to use ajax events when the type of interactions occur that indicate your users are actively using the page. For instance, typing a long message in a text area or filtering a large data table.
<p:ajax event="filter" listener="#{bean.activeListener}"/>
Either way, the goal is to keep the server aware that the user is indeed active without flooding the server with unneeded ajax events.

Radlistbox enable/disable checkbox VB.NET

I need help with disabling only the checkboxs in RadListBox
can someone show me how to do it please.(VB.NET)
aspx.code:
<telerik:RadListBox ID="rlbNavigateIncidents" runat="server" AutoPostBack="True" CheckBoxes="True" ShowCheckAll="False" Width="239px" Height="315px">
</telerik:RadListBox>

ASP Menu 4.0 AJAX client failed to load

I have a simple ASP.NET 4.0 site (no MVC). Just a Master page containing header, menu and footer. I added the script manager in the Master page too. The menu is an ASP.NET Menu control. Everything is OK on my development machine, but as soon as I move it to the GoDaddy server, the menu stops working. This is a dynamic menu loaded from a sitemap.
My problem is that the first time I load it, it just doesn't work. I always get an 'AJAX client-side framework failed to load error' and the "hover" doesn't work. But as soon as I click on one menu item, it changes the page and everything works fine afterward.
I tried a lot of things that I found here and there on the Internet. I put an EnablePartialRendering="True" to my ScriptManager, I added some code to manage ".axd" html handlers. But none of that seems to work.
Here's the code for the menu (test not final so still messy) :
<asp:Menu ID="mnuGauche" runat="server" DataSourceID="sitemap" BackColor="Transparent" RenderingMode="Table"
DynamicHorizontalOffset="0" Font-Names="Arial Black" Font-Size="small"
ForeColor="#7C6F57" Width="100%" Height="20px"
style="margin-left: 0px" Orientation="Horizontal" StaticEnableDefaultPopOutImage="false">
<StaticSelectedStyle BackColor="#5D7B9D" ForeColor="White" />
<StaticMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" />
<DynamicHoverStyle BackColor="#7C6F57" ForeColor="White" />
<DynamicMenuStyle CssClass="MenuDynamique" />
<DynamicSelectedStyle BackColor="#5D7B9D" ForeColor="White" />
<DynamicMenuItemStyle HorizontalPadding="5px" VerticalPadding="2px" Font-Size="small" />
<StaticHoverStyle BackColor="#7C6F57" ForeColor="White" />
</asp:Menu>
In my Web.config file, the only thing special that I have is :
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
Altough there's plenty of stuff on the web, nothing seems to really work for this menu control. Wich is kind of bizarre because it's one from Microsoft themself. Can anyone help me on that one ?

Cannot Add User Control to AJAX Toolkit TabContainer

I have a user control called "Request" that I am able to display outside of a TabContainer on my SharePoint 2010 application page. So the following works:
<UserControl:Request ID="Request1" runat="server" />
<Ajax:TabContainer ID="TabContainer1" runat="server" ScrollBars="None" Enabled="true">
<Ajax:TabPanel ID="TabPanel1" runat="server" HeaderText="Request">
<ContentTemplate>
<asp:Label ID="Label1" runat="server" Text="Label">Mylabel</asp:Label>
</ContentTemplate>
</Ajax:TabPanel>
</Ajax:TabContainer>
However, if I merely move the UserControl line into the ContentTemplate section, replacing the existing Label control, the page bombs out with a runtime error and "Request failed".
The workaround for me was to COPY, not MOVE, the user control into the ContentTemplate section, then give the copy a different ID and set the original (which I don't need) to visible="false". I have no idea why this works and it looks like a bug to me. If anyone can explain it, please do so...

Firefox not rendering contents of a Update panel

Why does the following code perform a partial render in IE but not in FF?
In FF, the time on the outside of the updatepanel will also refresh, not so in IE.
<form id="form1" runat="server">
<div>
<%=DateTime.Now.ToLongTimeString() %>
</div>
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<p>New time is <%=DateTime.Now.ToLongTimeString() %></p>
<asp:Button ID="Button1" runat="server" Text="Go get it" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="Button1" />
</Triggers>
</asp:UpdatePanel>
</form>
Can I know what version of Firefox you are using?
I tested this on Firefox 3.0 and Firefox 3.5 (clean install - no addons).
If I click the button only the new time refreshes, the outer time doesn't. So the partial rendering works.
If you are on Firefox 3.0 or 3.5 can you create a new firefox profile to test this?.
Oleg's comment about the EventName attribute on the AsyncPostBackTrigger is likely correct. However, I would add that the Triggers do not need to be explicitly defined in this case since the Button is contained in the UpdatePanel. Events from contained elements trigger the Async Postback by default so it's unnecessary.
You've got javascript disabled in FF and it's performing a full postback. :-)

Resources