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

[Solved] Work with Ajax forms?

0 Answers 61 Views
Editor
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Daniel Turner
Top achievements
Rank 1
Daniel Turner asked on 26 Oct 2010, 04:10 PM
Hello,

I was planning to use telerik MVC editors for a project that I am working on, but it appears that they do not work out of the box when inside ajax forms.  This didn't entirely surprise me as I understand there is javascript initialisation required to make the editor functional, ie:

jQuery('#Form_LongDescription').tEditor();

My question is, can I safely call this function manually upon swapping in the new form? Better yet, can I give all my editors a marker class, and call "$('.editor').tEditor()" on the whole page after any partial update? (This potentially will re-call tEditor() on already initialised editors outside the partial update, but presumeably the plugin is designed to ignore a duplicate ctor call?)

Secondly, I have a number of tabs on a particular screen, and editors inside a few of these tabs.  The editor on the initial tab works ok (on the initial full page load), but the format selector on an editor in the second tab does not work.  The options drop down but are 0 pixels in width, and also not vertically offset below the label (were they the correct width, the first option would appear on top of "Format" instead of below).  Presumeably this is a similar issue to google maps not working properly if initialised whilst invisible? Can you suggest any solution to this?  Curiously the font and size drop downs work without issue.
Tags
Editor
Asked by
Daniel Turner
Top achievements
Rank 1
Share this question
or