Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
553 views
I'm trying to define a CSS style to use in Combobox label which has WebBlue skin. I read about style definition in the forum and I added to my CSS file this code:

.RadComboBox_WebBlue .MyLabelStyle.riLabel
        {
    font-family: Verdana,Helvetica,Arial;
    font-size: 10pt;
    color: Navy;
        }

I assigned MyLabelStyle to the LabelCssClass property but nothing happens, the label style of the combobox doesn't change

Any suggestion?
Magdalena
Telerik team
 answered on 26 Mar 2015
6 answers
222 views
Hi - I would like to remove the time column from the agenda view, how can this be done?

Thanks
Magdalena
Telerik team
 answered on 26 Mar 2015
1 answer
102 views
Hi,

I need to react when a RadSlidingPane is expanded or collapsed.
To this end, I have the following declaration:

<telerik:RadSlidingZone ID="rszRight" runat="server" Width="22px" SlideDirection="Left">
<
telerik:RadSlidingPane ID="rspDetails" Title="Task Details" runat="server" Width="170px" OnClientCollapsed="rspDetails_Collapsed" OnClientExpanded="rspDetails_Expanded" >
...

Simply hovering over the pane's tab causes the OnClientExpanded event to fire (see green arrows in attachment).  This is as expected.
The problem is that the OnClientCollapsed event is firing when I click on the pin (dock) icon - not what I expected (see red arrow).
See the attached screenshot and note the console log at the bottom.

Am I doing something wrong?

Thanks in advance for any suggestions.

Jim

Vessy
Telerik team
 answered on 26 Mar 2015
2 answers
364 views
HI, i'm experiencing some difficulties on export content from radeditor (with images) to docx format, using radeditor.exportToDocX() method.

the problem is:
An exception of type 'Telerik.Web.UI.Editor.Export.RadEditorExportException' occurred in Telerik.Web.UI.dll but was not handled in user code
 
Additional information: The Document Processing Library fails to convert the RadEditor's content to RadFlowDocument

Here is the aspx:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Editor2.aspx.vb" Inherits="Assistente_Legal.Editor2" %>
 
<!DOCTYPE html>
 
<head runat="server">
    <title>Editor de Texto</title>
    <telerik:RadCodeBlock runat="server">
        <script type="text/javascript">
            function saveAsPrompt(arg) {
                //debugger;
                var txt = $get('<%= txtFileName.ClientID%>');
                txt.value = arg;
                var btn = $get('<%= btnSaveAsCallBack.ClientID%>');
                btn.click();
            }
 
            function closeWin() {
                //GetRadWindow().BrowserWindow.location.href = 'Default2.aspx';
                GetRadWindow().close();
            }
            function GetRadWindow() {
                var oWindow = null; if (window.radWindow)
                    oWindow = window.radWindow; else if (window.frameElement.radWindow)
                        oWindow = window.frameElement.radWindow; return oWindow;
            }
        </script>
    </telerik:RadCodeBlock>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="SM" runat="server">
            <Scripts>
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
            </Scripts>
        </telerik:RadScriptManager>
        <telerik:RadSkinManager ID="SKM" runat="server" ShowChooser="false" Skin="Windows7" />
        <telerik:RadWindowManager ID="WM" runat="server"></telerik:RadWindowManager>
        <telerik:RadFormDecorator ID="FD" runat="server" DecoratedControls="All"></telerik:RadFormDecorator>
        <telerik:RadAjaxLoadingPanel ID="LP" runat="server"></telerik:RadAjaxLoadingPanel>
        <div id="Conteudo" runat="server">
            <telerik:RadAjaxPanel runat="server" LoadingPanelID="LP">
                <telerik:RadToolBar ID="TB" runat="server" EnableRoundedCorners="true" EnableShadows="true">
                    <Items>
                        <telerik:RadToolBarButton ImageUrl="~/Images/save32.png" Value="save"
                            Text="Salvar" ToolTip="Salvar">
                        </telerik:RadToolBarButton>
                        <telerik:RadToolBarButton ImageUrl="~/Images/saveas32.png" Value="saveas"
                            Text="Salvar Como" ToolTip="Salvar Como">
                        </telerik:RadToolBarButton>
                        <telerik:RadToolBarButton ImageUrl="~/Images/pdf32.png" Value="pdf"
                            Text="Exportar para PDF" ToolTip="Exportar para PDF">
                        </telerik:RadToolBarButton>
                        <telerik:RadToolBarButton ImageUrl="~/Images/exit32.png" Value="exit"
                            Text="Sair sem salvar" ToolTip="Sair sem salvar">
                        </telerik:RadToolBarButton>
                    </Items>
                </telerik:RadToolBar>
                <asp:Label runat="server" ID="lblReadOnly" Visible ="false" Text="Visualizando Documento Público, alteração não permitida." ToolTip="Para alterar o conteúdo deste documento, você deve copiá-lo para Meus Documentos primeiro!" />
                <telerik:RadEditor ID="EDT" runat="server" Width="100%" ToolbarMode="RibbonBar" ToolsFile="/Styles/editor_toolbars.xml"
                    Style="min-height: 90%;" EditModes="Design" AutoResizeHeight="true" EnableResize="true">
                    <CssFiles>
                        <telerik:EditorCssFile Value="~/Styles/Editor.css" />
                    </CssFiles>
                    <TrackChangesSettings CanAcceptTrackChanges="False"></TrackChangesSettings>
                </telerik:RadEditor>
            </telerik:RadAjaxPanel>
        </div>
 
        <asp:HiddenField ID="txtFileName" runat="server" />
        <asp:Button ID="btnSaveAsCallBack" runat="server" Text="Button" style="display: none;" />
    </form>
</body>
</html>

Here is the code-behind:
Imports Telerik.Windows.Documents.Flow.Model
Imports Telerik.Windows.Documents.Flow.Model.Styles
Imports Telerik.Windows.Documents.Flow.FormatProviders.Docx
Imports System.IO
Imports Telerik.Web.UI
Imports System.Threading
 
Public Class Editor2
    Inherits System.Web.UI.Page
    Private S As Sessao
 
    Private ReadOnly Property EhNovoDocumento As Boolean
        Get
            Return IsNothing(Request("arq"))
        End Get
    End Property
 
    Private _NomeDoArquivo As String = ""
    Public Property NomeDoArquivo() As String
        Get
            If _NomeDoArquivo.Length = 0 And Not EhNovoDocumento Then _NomeDoArquivo = Request.QueryString("arq")
            Return _NomeDoArquivo
        End Get
        Set(ByVal value As String)
            _NomeDoArquivo = value
        End Set
    End Property
 
    ''' <summary>
    ''' Retorna o diretório indicado pela querystring("dir"), caso não possua, retorna o diretório Meus Documentos do usuário conectado.
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Private ReadOnly Property Diretorio As String
        Get
            If Not IsNothing(Request("dir")) Then
                Dim dir As String = Request("dir")
                If Mid(dir, 1, dir.Length) <> "/" Then dir &= "/"
                Return dir
            Else
                Return "/Documentos/Usuario/" & S.Usuario.UID & "/Meus Documentos/"
            End If
        End Get
    End Property
 
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Sessao.IsValid Then S = Sessao.Load Else S = New Sessao() : Sessao.Save(S)
 
        If Not IsPostBack Then
            EDT.DisableFilter(Telerik.Web.UI.EditorFilters.ConvertCharactersToEntities)
            ' EDT.EnableFilter(Telerik.Web.UI.EditorFilters.MakeUrlsAbsolute)
            If Not EhNovoDocumento Then
                Helpers.CarregarDocumento(EDT, Server.MapPath(NomeDoArquivo), S)
                If NomeDoArquivo.Contains("Documentos/Publico") Then desabilitaEdicao()
 
                End If
        End If
        setaDiretoriosEditor()
    End Sub
 
    Private Sub Page_PreRender(sender As Object, e As System.EventArgs) Handles Me.PreRender
        If S.Alert.HaveMessage Then
            If S.Alert.IsPrompt Then
                WM.RadPrompt(Helpers.EncodeJsString(S.Alert.Message), S.Alert.CallBackFn, 300, 100, Nothing, Helpers.EncodeJsString(S.Alert.Title), "")
            Else
                WM.RadAlert(Helpers.EncodeJsString(S.Alert.Message), 250, 150, Helpers.EncodeJsString(S.Alert.Title), "")
            End If
            S.Alert.Dismiss()
        End If
    End Sub
 
    Private Sub desabilitaEdicao()
        For Each B As RadToolBarButton In TB.Items
            If B.Value <> "exit" Then B.Enabled = False
        Next
        lblReadOnly.visible = True
    End Sub
 
    Private Sub setaDiretoriosEditor()
        Dim MeusDocumentosVirtual As String = "~/Documentos/Usuario/" & S.Usuario.UID & "/Meus Documentos/"
        Dim EsteProcessoVirtual As String = ""
 
        If Not IsNothing(Session("Processo")) Then
            Using P As Processo = Session("Processo")
                EsteProcessoVirtual = "~/Documentos/Usuario/" & S.Usuario.UID & "/" & P.ID
            End Using
        End If
        EDT.ImageManager.ViewPaths = {MeusDocumentosVirtual, EsteProcessoVirtual}
        EDT.ImageManager.DeletePaths = {MeusDocumentosVirtual, EsteProcessoVirtual}
        EDT.ImageManager.UploadPaths = {MeusDocumentosVirtual, EsteProcessoVirtual}
        EDT.ImageManager.MaxUploadFileSize = 1048576
        EDT.ImageManager.EnableAsyncUpload = True
        EDT.ImageManager.AllowFileExtensionRename = False
 
    End Sub
    Private Sub TB_ButtonClick(sender As Object, e As RadToolBarEventArgs) Handles TB.ButtonClick
        Select Case e.Item.Value
            Case "save"
                Save()
            Case "saveas"
                SaveAs()
            Case "pdf"
                SaveAsPDF()
            Case "exit"
                ExitWithoutSave()
        End Select
    End Sub
 
    Private Sub Save()
        If Not EhNovoDocumento Then
            DoSave(NomeDoArquivo)
        Else
            S.Alert.Show("Escolha Salvar Como...")
        End If
    End Sub
 
    Private Sub SaveAs()
        S.Alert.CallBackFn = "saveAsPrompt"
        S.Alert.Show("Digite o nome do arquivo.<br>A extensão .docx será adicionada automaticamente.<br>Os seguintes caracteres são permitidos: Letras, Números, Hífen, Espaço e Underline.", "Nome do Arquivo", True)
    End Sub
    Private Sub SaveAsCallBack(ByVal sender As Object, ByVal e As EventArgs) Handles btnSaveAsCallBack.Click
        Dim tempName As String = txtFileName.Value
        If tempName.Length = 0 Or Helpers.RegexMatch(tempName, Helpers.ExpressoesRegulares.LetrasNumerosAcentosEspacoUnderlineHifen) Then
            S.Alert.Show("Nome do Arquivo Inválido!")
        Else
            tempName = Helpers.RemoveExtensao(tempName)
            NomeDoArquivo = Diretorio & tempName & ".docx"
            DoSave(NomeDoArquivo)
        End If
    End Sub
 
    Private Sub SaveAsPDF()
        If NomeDoArquivo.Length = 0 Then
            NomeDoArquivo = Diretorio & "Novo Documento de Texto.PDF"
        Else
            NomeDoArquivo = Helpers.TrocaExtensao(NomeDoArquivo, "PDF")
        End If
        Try
            If File.Exists(NomeDoArquivo) Then File.Delete(NomeDoArquivo)
            Helpers.CriarPDF(EDT.Content, Server.MapPath(NomeDoArquivo), S)
        Catch ex As Exception
            Dim temp As String = LOG.Excecao(ex)
            S.Alert.Show("Falha Ao Tentar exportar para PDF. O Administrador foi notificado sobre este problema.")
            MailUtil.Send("contato@assistentelegal.com.br", "Exceção Detectada", "Falha Ao Tentar Exportar PDF.<br>" & temp)
        Finally
            Dim msg As String
            If EhNovoDocumento Then
                msg = "Documento Salvo em PDF com sucesso em: " & NomeDoArquivo & vbCrLf & "Atenção, o arquivo PDF é somente leitura, se você quiser editar este conteúdo no futuro, escolha 'Salvar Como' e digite o nome do arquivo."
            Else
                msg = "Documento Salvo em PDF com sucesso!"
            End If
            S.Alert.Show(msg)
        End Try
    End Sub
 
    Private Sub ExitWithoutSave()
        Dim script As String = "function f(){closeWin(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"
        ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, True)
    End Sub
 
    Private Sub DoSave(ByVal ARQ As String)
        'Dim provider As New DocxFormatProvider()
        'Dim document As RadFlowDocument = provider.Import(Input)
 
        If Helpers.EhWord(ARQ) Then EDT.ExportToDocx()
        If Helpers.EhRTF(ARQ) Then EDT.ExportToRtf()
        If Helpers.EhMarkdown(ARQ) Then EDT.ExportToMarkdown()
        If Helpers.EhTexto(ARQ) Then
            Try
                Using externalFile As New StreamWriter(Server.MapPath(ARQ), False)
                    externalFile.Write(EDT.Content)
                End Using
                S.Alert.Show("Documento salvo com sucesso!")
                Response.Redirect("/Editor2.aspx?arq=" & NomeDoArquivo)
            Catch tex As ThreadAbortException
                'ignore this exception
            Catch ex As Exception
                Dim temp As String = LOG.Excecao(ex)
                S.Alert.Show("Falha Ao Tentar Salvar o Arquivo. O Administrador foi notificado sobre este problema.")
                MailUtil.Send("contato@assistentelegal.com.br", "Exceção Detectada", "Falha Ao Tentar Salvar o Arquivo.<br>" & temp)
            End Try
        End If
    End Sub
 
    Private Sub EDT_ExportContent(sender As Object, e As Telerik.Web.UI.EditorExportingArgs) Handles EDT.ExportContent
        'neste momento, a propriedade NomeDoArquivo deverá estar configurada corretamente!!
        Dim ARQ As String = Server.MapPath(NomeDoArquivo)
        Try
            If File.Exists(ARQ) Then File.Delete(ARQ)
            Using externalFile As Stream = File.Create(ARQ)
                Dim b() As Byte = System.Text.Encoding.Default.GetBytes(e.ExportOutput)
                externalFile.Write(b, 0, b.Length)
                e.Cancel = True
            End Using
            S.Alert.Show("Documento salvo com sucesso!")
            Response.Redirect("/Editor2.aspx?arq=" & NomeDoArquivo)
        Catch tex As ThreadAbortException
            'ignore this exception
        Catch ex As Exception
            Dim temp As String = LOG.Excecao(ex)
            S.Alert.Show("Falha Ao Tentar Salvar o Arquivo. O Administrador foi notificado sobre este problema.")
            MailUtil.Send("contato@assistentelegal.com.br", "Exceção Detectada", "Falha Ao Tentar Salvar o Arquivo.<br>" & temp)
        End Try
    End Sub
End Class

The image i'm using is attached.

Thanks for the help.
Luiz
Top achievements
Rank 1
 answered on 26 Mar 2015
1 answer
93 views
Hello Telerik Team,

We would like to inquire regarding the RadProgressArea we used this to create a custom progress bar for our web application. The Progress bar functionality of the application is working as expected, or the progress bar is visible in the web application when deployed in Windows Server 2008 (has IIS 7 installed) but not in Windows Server 2003 (has IIS 6 installed).  May we ask if there are known limitations for RadProgressArea specifically for OS version or IIS?

Thanks! :)
Dimitar
Telerik team
 answered on 26 Mar 2015
1 answer
1.6K+ views
Hi,
I have a Radgrid and I bind it with SqlAdapter. My problem is that I want to change just one column's value. Is that possible? Thank you. 

My column name is IsShadow and it binds true or false. I cannot change it. If value is false or true, I change column text appearence not database update.
Eyup
Telerik team
 answered on 26 Mar 2015
4 answers
243 views
Radgrid have item template columns using RadNumeric TextBox ,CheckBox . I am using "OnKeypress" function in java Script  when i press key check box checked ,otherwise unchecked, and i using (delete,backspace,Alt+A) to remove the data in text box on that time unchecked the check box 

pleas solve me this problem 
NA
Top achievements
Rank 1
 answered on 26 Mar 2015
4 answers
199 views
My grid is grouping FirstName, LastName Grade just fine. However it is puttng a ";" inbetween each column value in the group item row.
Example: Michel; Hobbs; Grade:2
I need it to be Michael Hobbs  Grade:2 without the ";".

Is there any way to turn off the ";" so it doesn't show?

Thanks,
Michael Hobbs
mrhobbs@cox-internet.com


Eyup
Telerik team
 answered on 26 Mar 2015
2 answers
81 views
Hi,

I have a RadTabStrip that behaves nicely with an iframe in Internet Explorer but it does not behave in Chrome or Firefox.  The RadTabStrip keeps overlaying the iframe in the other non-Microsoft browsers while the RadMultiPage does not.  I used the style's z-index but does not have much luck.  Please help.

Thanks.

An D.
An
Top achievements
Rank 1
 answered on 26 Mar 2015
4 answers
193 views
Hi,

I have the following scenario.

Creating Treeview Control in .aspx file as follows:

                            <telerik:RadTreeView ID="WinFabExplorerMenu" runat="server" OnNodeExpand="WinFabExplorerMenu_NodeExpand" OnClientNodeClicked="ClientNodeClicked">
                            </telerik:RadTreeView>

On client side, adding node to the tree and set expand mode to server side call back. After this, when I clicked the + sign on the node, the server side node expand event not firing.

function OnFederationTileClicked(sender, args) {
    $('#collapseOne').collapse('hide');
    var tree = $find("ctl00_MainContent_WinFabExplorerMenu");
    tree.trackChanges();
    tree.get_nodes().clear();
    var node = new Telerik.Web.UI.RadTreeNode();
    node.set_text(sender.get_navigateUrl());
    node.set_category('Root');
    node.set_expanded(false);
    var attributes = node.get_attributes();
    attributes.setAttribute("Federation", sender.get_navigateUrl());
    attributes.setAttribute("Path", "Test");
    node.set_expandMode(Telerik.Web.UI.TreeNodeExpandMode.ServerSideCallBack);
    node.set_postBack(true);
    tree.get_nodes().add(node);
    tree.commitChanges();
}
Skb Dev
Top achievements
Rank 1
 answered on 26 Mar 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?