<%@ 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.