Upgrading code to Telerik Ajax

2 posts, 0 answers
  1. Joe Riley
    Joe Riley avatar
    6 posts
    Member since:
    Mar 2010

    Posted 14 Jan 2013 Link to this post

    Have a project that was developed in Telerik ASP.net (pre AJAX) and moving it into ASP.net AJAX.  However running into some problems and not quite sure of how to finish the update process.  Hoping someone might offer some assistance it would be appreciated.
    Errors are with the following lines: 
    me.editor.editmodes.html = user.isinrole("Administrator")

    Dim pagelink as new radEditorUtils.link(.....)
     

     

    Me.editor.EditModes.Html = User.IsInRole("Administrator")
            Me.editor.Links.Clear()
     
            Dim dtPages As DataTable = DAL.list_pages_enabled()
            For Each page As DataRow In dtPages.Rows
                Dim pageLink As New RadEditorUtils.Link(page("title").ToString(), String.Format("/Public/Default.aspx?pid={0}", page("pid").ToString), "_self", page("title").ToString())
                Dim dt As New DataTable
                dt = DAL.list_sub_pages(page("pid").ToString)
                For Each subPage As DataRow In dt.Rows
                    Dim subPageLink As New RadEditorUtils.Link(subPage("title").ToString(), String.Format("/Public/Default.aspx?pid={0}", subPage("pid").ToString), "_self", subPage("title").ToString())
                    pageLink.Add(subPageLink)
                Next
                Me.editor.Links.Add(pageLink)
            Next

    Also how to handle editor.CancelClicked and editor.SubmitClicked?  Is there something different involving these?

  2. Rumen
    Admin
    Rumen avatar
    14459 posts

    Posted 15 Jan 2013 Link to this post

    Hello,

    You can see how to add custom links dynamically in this article: Custom Links.

    The RadEditor for ASP.NET AJAX was intended to be as simple to configure as possible - and we decided to follow the familiar pattern of Asp:TextBox as this is in fact how the editor is used in almost all cases. The development paradigm is that the editor is a part of a larger page that has some other means of making a postback or a callback - and the editor should not interfere in it. Thus, the Submit and Cancel buttons were removed as well as their SubmitClicked and CancelClicked events.

    You can easily implement a custom Save button in the editor (even simpler than usual, as there is CSS in the editor that will style a tool called Save for you automatically). In case you wish to go this way and want to have a Save tool on the toolbar please see the following help article: http://www.telerik.com/help/aspnet-ajax/addingsaveandcancelbuttonstoolbar.html.

    You can find more information in the following help article: Migration from RadEditor Classic to RadEditor for ASP.NET AJAX.


    Greetings,
    Rumen
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top