
QualiWareUA
Top achievements
Rank 1
QualiWareUA
asked on 22 Jul 2008, 09:24 AM
Hi, guys.
I have a following trouble: in client event handler OnClientSelectionChange I try to disable Outdent toolbutton but it still stays enabled and works well.
Here is the code of my java function:
I have a following trouble: in client event handler OnClientSelectionChange I try to disable Outdent toolbutton but it still stays enabled and works well.
Here is the code of my java function:
function enableEditorButtonOutdent(editor) |
{ |
var toolAdapter = editor.get_toolAdapter(); |
var outdentBtn = toolAdapter.getToolByName("Outdent"); |
if(outdentBtn != null) |
outdentBtn.set_enabled(false); |
} |
5 Answers, 1 is accepted
0
Hi Alex,
Please, try the solution provided in the following help article: Set Button State.
Best regards,
Rumen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Please, try the solution provided in the following help article: Set Button State.
Best regards,
Rumen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

QualiWareUA
Top achievements
Rank 1
answered on 22 Jul 2008, 11:13 AM
Rumen, thanks for solution, but unfortunately it doesn't work :(.
I'm using IE 7.0.5730.13 if it would be helpful for you.
I'm using IE 7.0.5730.13 if it would be helpful for you.
0

QualiWareUA
Top achievements
Rank 1
answered on 23 Jul 2008, 12:46 PM
Hi, guys.
Could you make a suggestion with earlier mentioned problem?
Could you make a suggestion with earlier mentioned problem?
0
Hi Alex,
Please, try the following code:
<script type="text/javascript">
function enableEditorButtonOutdent(editor)
{
var outdentBtn = editor.getToolByName("Outdent");
setTimeout(function()
{
if(outdentBtn != null)
outdentBtn.set_enabled(false);
}, 300);
}
</script>
<telerik:RadEditor id="RadEditor1" OnClientSelectionChange="enableEditorButtonOutdent" runat="server"></telerik:RadEditor>
The editor set the states in accordance to the cursor and it is needed a small delay after the click in the content area to update the state of the button and disable it.
Greetings,
Rumen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Please, try the following code:
<script type="text/javascript">
function enableEditorButtonOutdent(editor)
{
var outdentBtn = editor.getToolByName("Outdent");
setTimeout(function()
{
if(outdentBtn != null)
outdentBtn.set_enabled(false);
}, 300);
}
</script>
<telerik:RadEditor id="RadEditor1" OnClientSelectionChange="enableEditorButtonOutdent" runat="server"></telerik:RadEditor>
The editor set the states in accordance to the cursor and it is needed a small delay after the click in the content area to update the state of the button and disable it.
Greetings,
Rumen
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

QualiWareUA
Top achievements
Rank 1
answered on 24 Jul 2008, 07:36 AM
Rumen, thanks a lot!
Your solution works well :)
Your solution works well :)