This is a migrated thread and some comments may be shown as answers.

Update radeditor to database failed

1 Answer 40 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
kibitz
Top achievements
Rank 1
kibitz asked on 05 Feb 2011, 02:25 AM
telerik team please help me asap, im im trying to update the content in rad editor but nothing change when i actually update it in my button here is my code in update
cmd = new sqlcommand("UPDATE id,template FROM TEMPLATES WHERE id=1")

      SaveInCurrentFile(radEditorTemplate)
        cmd = New SqlCommand("UPDATE tblTemplate SET template=@temp where id=@id", con)
        cmd.Parameters.AddWithValue("@id", "1")
        cmd.Parameters.AddWithValue("@temp", html)
        cmd.ExecuteNonQuery()
so i actually guessing whats my wrong?
i also tried java script

  <script type="text/javascript">  
         
        function OnCLientClick(editor, args)     
        {                       
           editor.attachEventHandler("onkeydown", function(e)     
           {     
           setTimeout(function(){  
               alert("Content changed! Current content: " + $find("<%=radEditorTemplate.clientID %>").get_text()); }, 0);    
          
           });     
        }     
    </script>


please telerik team help me asap i need it badly in my project thank you in regards

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 08 Feb 2011, 06:19 PM
Hello Kibitz,

You can find a fully working Save In Database example with code here. You can also check the following demo: Datagrid Edit Template.

Best regards,
Rumen
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
General Discussions
Asked by
kibitz
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or