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

[Solved] How to tab out of a GridHTMLEditorColumn

2 Answers 85 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ying
Top achievements
Rank 1
Ying asked on 30 Jun 2009, 10:20 PM
I have a GridHTMLEditorColumn in my grid. When doing editing, it is the only column that tab does not work. Does anyone know how to tab out of this editor column or is there any workaround for that?

Thanks!
Ying

 

2 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 01 Jul 2009, 03:11 PM
Hi Ying,

In order to achieve this scenario:

1. Define the following client event handler:

    <script type="text/javascript">  
      
        function OnClientLoad(editor, args)  
        {              
            editor.removeShortCut("InsertTab");   
        }  
 
      
    </script> 

2. Add an event handler to the grid's ItemCreated event as follows:

    protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)  
    {  
        if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
        {  
            GridEditableItem item = e.Item as GridEditableItem;  
 
            GridHTMLEditorColumnEditor editor = item.EditManager.GetColumnEditor("Address"as GridHTMLEditorColumnEditor;  
 
            editor.Editor.OnClientLoad = "OnClientLoad";  
              
        }   
    } 

I hope this helps.

Greetings,
Tsvetoslav
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Ying
Top achievements
Rank 1
answered on 01 Jul 2009, 03:56 PM
Thank you Tsvetoslav! That worked perfectly!

Ying
Tags
Grid
Asked by
Ying
Top achievements
Rank 1
Answers by
Tsvetoslav
Telerik team
Ying
Top achievements
Rank 1
Share this question
or