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

Implement Ontextchanged event

4 Answers 104 Views
Quick Fixes
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
bibhudatta Mangaraj
Top achievements
Rank 1
bibhudatta Mangaraj asked on 19 Jan 2010, 11:37 AM
How to achive the Ontextchanged event ?how to call it?and in which event i can call this?

4 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 20 Jan 2010, 08:43 AM
Hello Bibhudatta,

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

Since the new editor does not offer any more an Update button, it is not longer registered as a postback control and the OnTextChanged event is not implemented. You can use it only for backward compatibility to avoid server errors but this event does not do anything.

Our recommendation is to implement the desired functionality yourself by storing the content in some ViewState variable and on postback to compare the current content with the content saved in this variable. You can obtain the content on the client using the editor.get_html(true) method and check whether it is changed by attaching your code to the onkeydown event using the attachEventHandler method.

Please, note that there is not a reliable way to check whether the content is modified on the server because the content is validated and modified by the browser and the RadEditor's built-in content filters. For example if you load non well formed content in the editor then the editor and the browser will change it even without user interaction and when you save it the content will be different from the initial one.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
sunshinecorazon89
Top achievements
Rank 1
answered on 28 Oct 2010, 01:45 AM
Same concern here..
0
Tom
Top achievements
Rank 1
answered on 07 Jun 2011, 04:51 PM
Similar thought here to the OnSubmitClicked issue...

Please update your documentation.  I'm wasting valuable development time chasing non-existent functionality that 90% of the documentation assures me exists.  

Thanks,
- Tom
0
Rumen
Telerik team
answered on 10 Jun 2011, 10:57 AM
Hello Tom,

The documentation of RadEditor for ASP.NET AJAX does not contain references to the OnSubmitClicked event of RadEditor Classic. It seems that you have found such references using Google which sometimes suggests links to the  documentation of RadEditor Classic.

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
Quick Fixes
Asked by
bibhudatta Mangaraj
Top achievements
Rank 1
Answers by
Rumen
Telerik team
sunshinecorazon89
Top achievements
Rank 1
Tom
Top achievements
Rank 1
Share this question
or