Dear Telerik Admin,
Can you please help me fnd solution to my problem.
I have a checkbox within my application & on client click of it I call an javascript function which display & hide panel control. Now I have also an RadEditor within my form, now what I want to do here is that, when I unchecks my check box I want Content within the RadEditor to be in only PREVIEW MODE (i.e I wont allow user to view edit & HTML view modes), but when user check an checkbox control all I want to show is EDIT & HTML view modes & no preview mode.
Though I have tried to implement the same as shown below :-
But its not working for me.
Also, I want the same feature on (!PageIsPostBack) on code behind.
Can you help me out ?
Thanks
Ajay
Can you please help me fnd solution to my problem.
I have a checkbox within my application & on client click of it I call an javascript function which display & hide panel control. Now I have also an RadEditor within my form, now what I want to do here is that, when I unchecks my check box I want Content within the RadEditor to be in only PREVIEW MODE (i.e I wont allow user to view edit & HTML view modes), but when user check an checkbox control all I want to show is EDIT & HTML view modes & no preview mode.
Though I have tried to implement the same as shown below :-
function
OnClientClick() {
var
IsCustomPageHeaderCheckBox = document.getElementById(
'<%= IsCustomPageHeaderCheckBox.ClientID %>'
);
var
TemplateHeaderPanel = document.getElementById(
'<%= TemplateHeaderPanel.ClientID %>'
);
var
editor = $find(
"<%=PageHeaderRadEditor.ClientID%>"
);
var
selectedvalue = IsCustomPageHeaderCheckBox.checked;
// getting the selected value
if
(selectedvalue ==
true
) {
TemplateHeaderPanel.style.display =
'none'
;
editor.set_mode(1);
//Design mode
editor.set_mode(2);
//Html mode
}
else
{
TemplateHeaderPanel.style.display =
'block'
;
editor.set_mode(4);
//Preview mode
}
}
Also, I want the same feature on (!PageIsPostBack) on code behind.
Can you help me out ?
Thanks
Ajay