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

How to set Tab Order

1 Answer 161 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
Anto (DLL Version : 2008.3.1314.35) asked on 29 Oct 2009, 04:19 PM
Hi All

I have Three TextBoxes with a RadGrid.which contains two Combo boxes.

I need to set the Tab Order.

From the Third Test Box if I click the TAB key then it highlights the whole grid.

The Cursor must highlight the radcombobox inside the RadGrid.

Is there any option for this.

Thanking You.

-Anto

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 30 Oct 2009, 07:35 AM
Hello Anto,

You can try out the following code to focus the RadCombobox in the grid on tab out of the third textbox:
aspx:
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> 
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox> 
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox> 
 
<telerik:RadGrid ID="RadGrid1" DataSourceID="SqlDataSource1" runat="server" OnItemDataBound="RadGrid1_ItemDataBound" OnPreRender="RadGrid1_PreRender" >              
    <MasterTableView DataSourceID="SqlDataSource1"
        <Columns> 
            <telerik:GridTemplateColumn UniqueName="TemplateColumn"
                <ItemTemplate>                             
                <telerik:RadComboBox ID="RadComboBox1" runat="server" DataSourceID="SqlDataSource1" DataTextField="FirstName" DataValueField="Age">                             
                </telerik:RadComboBox> 
                </ItemTemplate> 
            </telerik:GridTemplateColumn> 
               .....

c#:
protected void RadGrid1_PreRender(object sender, EventArgs e) 
    { 
        RadComboBox combo = (RadComboBox)RadGrid1.MasterTableView.Items[0].FindControl("RadComboBox1"); 
        TextBox3.Attributes.Add("onBlur""FocusCombo('" + combo.ClientID + "')"); 
    } 

js:
function FocusCombo(combo) 
    { 
      var combo =  $find(combo); 
      combo.get_inputDomElement().focus();       
       
    } 

Thanks
Princy.
Tags
Grid
Asked by
Anto (DLL Version : 2008.3.1314.35)
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Share this question
or