Hello,
I using in my application some form RadAjaxPannels, and in some cases I getting interesting exceptions susch as:
I don't know what exactly can be wrong because I reviewed my code it seems all looks quite good. Also I used same functionality with RadControls for asp.net it working good, and when migrated to the RadControls for ASPNET AJAX I encountered with such problems in forms where used rad ajax. And in some scenariuos it works fine, but sometimes crashes hard to predict when and why it crashes.
So maybe you could help me with that problem.
I can only copy code of one of my forms where I getting exception, because whole system is hudge enough. I am using ms web clint factory for client and for services web service factory. Is it can affet somehow ajax ?
So here it is code of one form:
Aspnet:
<%
@ Page Language="C#" AutoEventWireup="true" Inherits="Reaturn_Client_Modules_CashFlowForecast_CfPlanningGeneral_Edit" Title="Untitled page" MasterPageFile="~/MasterPages/ExternalMasterPage.master" Codebehind="Edit.aspx.cs" %>
<%
@ Import namespace="Telerik.Web.UI"%>
<%
@ Register Namespace="Telerik.WebControls" Assembly="RadTabStrip.Net2" TagPrefix="radTS" %>
<%
@ Import namespace="Resources"%>
<
asp:Content ID="Content1" ContentPlaceHolderID="DefaultContent" Runat="Server">
<pp:ObjectContainerDataSource ID="CfPlanningGeneralContainerDataSource" runat="server" DataObjectTypeName="CashFlowCalculation.DataContracts.CfPlanningGeneralFull" />
<pp:ObjectContainerDataSource ID="PropertyDataSource" runat="server" DataObjectTypeName="PropertyPortfolio.DataContracts.PropertySmall" />
<pp:ObjectContainerDataSource ID="QualificationsDataSource" runat="server" DataObjectTypeName="PropertyPortfolio.DataContracts.QualificationSmall" />
<rea:DataFormView ID="FormView1" runat="server" DataSourceID="CfPlanningGeneralContainerDataSource" DefaultMode="Edit" DataKeyNames="Id">
<EditItemTemplate>
<asp:HiddenField ID="VersionField" runat="server" Value='<%# Bind("Version") %>' />
<radTS:RadTabStrip ID="RadTabStrip1" runat="server" SelectedIndex="0" Skin="Outlook" MultiPageID="RadMultiPage1">
<Tabs>
<radTS:Tab runat="server" Text="<%$ Resources:pageresources, CfPlanningGeneralEdit_GeneralDataTab %>" ID="GeneralDataTab">
</radTS:Tab>
<radTS:Tab runat="server" Text="<%$ Resources:pageresources, CfPlanningGeneralEdit_PropertyTab %>" ID="PropertyTab">
</radTS:Tab>
</Tabs>
</radTS:RadTabStrip>
<radTS:RadMultiPage ID="RadMultiPage1" runat="server" BackColor="WhiteSmoke" BorderColor="Gainsboro"
BorderStyle="Solid" BorderWidth="1px" SelectedIndex="0" Height="225px" Width="400">
<radTS:PageView ID="PageView1" runat="server">
<table width="100%">
<tr>
<td>
<asp:Label ID="CashFlowVersionLabel" runat="server" Text="<%$ Resources:entityfieldresources, CfPlanningGeneral_CfVersion %>" SkinID="SmallLabel"></asp:Label></td>
<td>
<asp:TextBox ID="CashFlowVersionTextBox" runat="server" Width="200px" Text='<%# Bind("CashFlowVersion") %>' ></asp:TextBox>
<ppv:PropertyProxyValidator
ID="PropertyProxyValidator1"
runat="server"
ControlToValidate="CashFlowVersionTextBox"
PropertyName="CashFlowVersion"
RulesetName=""
Display="None"
DisplayMode="List"
SourceTypeName="CashFlowCalculation.DataContracts.CfPlanningGeneralFull">
</ppv:PropertyProxyValidator>
</td>
</tr>
<tr>
<td>
<asp:Label ID="StartMonthLabel" runat="server" Text="<%$ Resources:entityfieldresources, CfPlanningGeneral_StartMonth %>" SkinID="SmallLabel"></asp:Label></td>
<td>
<rea:MonthChooser
AssemblyName="CashFlowCalculation.DataContracts"
ID="StartMonthChooser"
runat="server"
SelectedMonth='<%# Bind("StartMonth") %>'
SourceTypeNameForValidation="CashFlowCalculation.DataContracts.CfPlanningGeneralFull"
PropertyNameForValidation="StartMonth"
/>
</td>
</tr>
<tr>
<td>
<asp:Label ID="TermLabel" runat="server" SkinID="SmallLabel" Text="<%$ Resources:entityfieldresources, CfPlanningGeneral_Term %>"></asp:Label></td>
<td>
<telerik:RadNumericTextBox ID="TermTextBox" runat="server" Width="200px" Text='<%# Bind("Term") %>' NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator="" Type="Number" MinValue="0">
</telerik:RadNumericTextBox>
<ppv:PropertyProxyValidator
ID="PropertyProxyValidator2"
runat="server"
ControlToValidate="TermTextBox"
PropertyName="Term"
RulesetName=""
Display="None"
DisplayMode="List"
SourceTypeName="CashFlowCalculation.DataContracts.CfPlanningGeneralFull"
OnValueConvert="OnTermValueConvert">
</ppv:PropertyProxyValidator>
</td>
</tr>
</table>
</radTS:PageView>
<radTS:PageView ID="PageView2" runat="server">
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="AjaxLoadingPanel1">
<table width="100%">
<tr>
<td colspan="2">
<asp:Label ID="SelectPropertiesLabel" runat="server" SkinID="SmallLabel" Text="<%$ Resources:pageresources, CfPlanningGeneralEdit_SelectPropertiesLabel %>"></asp:Label></td>
</tr>
<tr>
<td style="padding-right: 3px" colspan="2">
<asp:Panel ID="PropertyPanel" runat="server" BackColor="White" BorderColor="#7F9DB9" BorderWidth="1px"
Height="148px" ScrollBars="Auto" Width="100%">
<%
--<asp:UpdatePanel runat="server" ID="UpdatePanel1" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="SelectAllButton" />
<asp:AsyncPostBackTrigger ControlID="DeselectAllButton" />
<asp:AsyncPostBackTrigger ControlID="QualificationComboBox" />
</Triggers>
<ContentTemplate>--
%>
<asp:CheckBoxList ID="PropertyCheckBoxList" runat="server" DataSourceID="PropertyDataSource"
DataTextField="Name" DataValueField="Id" RepeatColumns="2">
</asp:CheckBoxList>
<%
--</ContentTemplate>
</asp:UpdatePanel>--
%>
</asp:Panel>
</td>
</tr>
<tr>
<td style="width:70px">
<asp:Label ID="QualificationLabel" runat="server" Text="<%$ Resources:pageresources, QualificationLabel %>" SkinID="SmallLabel"></asp:Label>
</td>
<td align="left">
<rea:ReaturnComboBox ID="QualificationComboBox" runat="server" AutoPostBack="True"
DataTextField="Name" DataValueField="Id" DataSourceID="QualificationsDataSource"
Width="150px" MarkFirstMatch="True" Height="200px"
SourceTypeNameForValidation="PropertyPortfolio.DataContracts.QualificationSmall"
PropertyNameForValidation="Name"
OnSelectedIndexChanged="PropertyComboBox_SelectedIndexChanged"
NoneItemText="<%$ Resources:global, ShowAll %>" />
</td>
</tr>
<tr>
<td style="padding-bottom: 5px" colspan="2">
<asp:Button ID="SelectAllButton" CausesValidation="false" runat="server" Text="<%$ Resources:global, SelectAll %>" OnClick="SelectAllButton_Click" />
<asp:Button ID="DeselectAllButton" CausesValidation="false" runat="server" Text="<%$ Resources:global, DeselectAll %>" OnClick="DeselectAllButton_Click" /></td>
</tr>
</table>
</telerik:RadAjaxPanel>
</radTS:PageView>
</radTS:RadMultiPage>
<telerik:RadAjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server">
<img alt="" src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading2.gif") %>' style="margin-top: 40px;" />
</telerik:RadAjaxLoadingPanel>
</EditItemTemplate>
</rea:DataFormView>
</
asp:Content>
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="UC Combo.ascx.vb" Inherits="IPS_Gateway.UC_Combo" %><script type="text/javascript"> function pageLoad() { } function ShowHideList(sender, args) { toggleList = sender.get_selectedToggleStateIndex(); switch (toggleList) { case 0: alert('0'); break; case 1: alert('1'); break; case 2: alert('2'); break; } } function ComboItemChecked(strClientIds, args) { var item = args.get_item() var itemText = item.get_text(); var aryClientIds = strClientIds.split(","); var cmbField = $find(aryClientIds[0]); var hdfSelectedCount = document.getElementById(aryClientIds[1]); var hdfSelectedValue = document.getElementById(aryClientIds[3]); var hdfSelectedText = document.getElementById(aryClientIds[2]); var hdfCheckedIndex = document.getElementById(aryClientIds[4]); alert(aryClientIds[5]); // var ibtDisplay = document.getElementById(aryClientIds[5]); // var ibtDisplay = $find(aryClientIds[5]); var ibtDisplay = $telerik.findButton(aryClientIds[5]); alert(ibtDisplay); ibtDisplay.set_selectedToggleState(1); } </script> <asp:UpdatePanel ID="uppList" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false"> <ContentTemplate> <asp:HiddenField ID="hdfSelectedCount" runat="server" EnableViewState ="true" /> <%-- Holds a count of the number of items that have been selected. Assigned to public property prpSelectedCount. --%> <asp:HiddenField ID="hdfSelectedText" runat="server" EnableViewState ="true"/> <%-- Holds the text values of all items that have been selected. Assigned to public property prpSelectedText. --%> <asp:HiddenField ID="hdfSelectedValue" runat="server" EnableViewState ="true"/> <%-- Holds the value of all items have been selected. Assigned to public property prpSelectedValue. --%> <asp:HiddenField ID="hdfCheckedIndex" runat="server" EnableViewState ="true" value="1"/> <asp:HiddenField ID="hdfFieldClientId" runat="server" EnableViewState ="true"/> <asp:Panel id="pnlList" runat="server" style="float:left;"> <asp:Label ID="lblField" runat="server" Text="Combo 1" Width="90px" /> <telerik:RadComboBox ID="rcbField" runat="server" AllowCustomText="true" AutoPostBack="true" MarkFirstMatch="false" ExpandAnimation-Type="None" CollapseAnimation-Type="None" ExpandDirection="Down" Width="250px" Checkboxes="true" EnableEmbeddedSkins="true" Skin="Office2010Blue" EnableScreenBoundaryDetection="false" EnableVirtualScrolling="false"> <Items> <telerik:RadComboBoxItem Text="Item 1" Value = "1" /> <telerik:RadComboBoxItem Text="Item 2" Value = "2" /> <telerik:RadComboBoxItem Text="Item 3" Value = "3" /> <telerik:RadComboBoxItem Text="Item 4" Value = "4" /> </Items> <HeaderTemplate> <telerik:RadButton ID="rbtListDisplay" runat="server" Width="80px" Height="22px" Skin="Default" ButtonType="StandardButton" ToggleType="CustomToggle" OnClientToggleStateChanged="ShowHideList" AutoPostBack="false" ToolTip="Show List" > <ToggleStates> <telerik:RadButtonToggleState Text="." PrimaryIconUrl="~/App_Themes/Images/UC Multi Select Combo/Blank 16.png" Selected="true" /> <telerik:RadButtonToggleState Text="." PrimaryIconUrl="~/App_Themes/Images/UC Multi Select Combo/Blue List 14.ico" /> <telerik:RadButtonToggleState Text="." PrimaryIconUrl="~/App_Themes/Images/UC Multi Select Combo/Checked 14.ico" /> </ToggleStates> </telerik:RadButton> <asp:Label ID="lblHeader" runat="server" /> <asp:ImageButton ID="ibtClose" runat="server" ImageUrl ="~/App_Themes/Images/UC Multi Select Combo/X Close.png" ImageAlign="Middle" ToolTip="Close Drop Down" Width="30" /> </HeaderTemplate> </telerik:RadComboBox> </asp:Panel> </ContentTemplate> </asp:UpdatePanel>Private Sub rcbField_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles rcbField.PreRender Dim aryClientIds(6) As String Dim strClientIds As String Me.hdfCheckedIndex.Value = 1 strClientIds = Me.rcbField.ClientID + "," + _ Me.hdfSelectedCount.ClientID + "," + _ Me.hdfSelectedText.ClientID + "," + _ Me.hdfSelectedValue.ClientID + "," + _ Me.hdfCheckedIndex.ClientID + "," + _ Me.rcbField.Header.FindControl("rbtListDisplay").ClientID Me.rcbField.OnClientItemChecked = "function(sender, args){ComboItemChecked('" + strClientIds + " ', args);return false;}" End Sub<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm4.aspx.vb" Inherits="IPS_Gateway.WebForm4" %><%@ Register TagPrefix="wucc" TagName="Combo1" Src="~/UC Combo.ascx" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <div> <act:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" EnablePartialRendering="true" AsyncPostBackTimeout="5000"/> <wucc:Combo1 Id="rcb1" runat="server" /> </div> </form></body></html>Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException:
An unknown error occurred while processing the request on the server. The status code returned from the
server was: 401
And in the script tab from firebug i get the next values: 0|error|401||.
I also followed the suggest from the telerik help thread: http://www.telerik.com/help/aspnet-ajax/asyncupload-troubleshooting.html,
where explains about making changes in the web.config for allowing telerik controles have authorization,
separated from the forms authentication but it still not working.
This is an example of how i have one of my configuration files for one role:<?xmlversion="1.0"?>
<configuration>
<system.web>
<authorization>
<allowroles="Alumno"/>
<denyusers="*"/>
</authorization>
</system.web>
<locationpath="Telerik.Web.UI.WebResource.axd">
<system.web>
<authorization>
<allowusers="*" />
</authorization>
</system.web>
</location>
The control declaration in my aspx file looks like this:<telerik:RadAsyncUploadrunat="server"ID="T_uploadArchivo"MaxFileInputsCount="1"AllowedFileExtensions="doc,docx"
onfileuploaded="T_uploadArchivo_FileUploaded"TemporaryFolder="~/Inicio/Alumno/Temporal">
<FileFilters>
<telerik:FileFilterDescription="Documentos de Procesador de textos(*.doc y *.docx)"Extensions="doc,docx"/>
</FileFilters>
</telerik:RadAsyncUpload>
The temporary folder is inside the same folder where authenticated user is, and i move the file manually to the Final Destination.
I also have tried some other solutions posted on the forums but nothing seems to work, i hope someone could help me solve this, thanks.
Hello,
How to set width of the buttons inside the telerik:GridTemplateColumn column. I add 2 buttons to my grid
<telerik:GridTemplateColumn UniqueName="Export2"> <ItemTemplate> <telerik:RadButton ID="btnExport2" runat="server" Text="Button2" CommandName="Export2" Width="100px" /> </ItemTemplate> <ItemStyle HorizontalAlign="Center"/></telerik:GridTemplateColumn><telerik:GridTemplateColumn UniqueName="Export1"> <ItemTemplate> <telerik:RadButton ID="btnExport1" runat="server" Text="Button1" CommandName="Export1" Width="100px" /> </ItemTemplate> <ItemStyle HorizontalAlign="Center" /></telerik:GridTemplateColumn>How to set buttons' width to fill all column's width? At that moment they does not fill all column's with. Take a alook at attached file.
Thank you.