We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

How to set tabindex for input element and NumericTextBox in Angular Grid

I am using the angular grid with a custom ng-template for editing.

On the template I got normal <input /> elements as well as one <ejs-numericbox />.

I would like to change the order of tabindex.

How can I set the tabindex on the <ejs-numericbox /> as well as the "Save" and "Cancel" buttons accordingly?


1 Reply

PS Pavithra Subramaniyam Syncfusion Team February 6, 2019 01:07 PM UTC

Hi Wolfgang, 
Greetings from Syncfusion. 
From this query, we found that you want to set the tabindex for input element and NumericTextBox. For the input element you can provide the tabindex directly in html tag like as following code snippet, 
<input formControlName="OrderID" tabindex="2" data-msg-containerid='OrderIDError' id="OrderID" name="OrderID" type="text"> 
For NumericTextBox, we suggest to use created event of the NumericTextBox to provide the tabindex like as following code snippet, 
<ejs-numerictextbox #numeric formControlName="Freight" (created)='onCreated($event)' id="Freight" placeholder="Freight" floatLabelType='Always'></ejs-numerictextbox> 
export class DialogReactiveFormComponent implements OnInit { 
    @ViewChild('numeric') numeric: NumericTextBox; 
      this.numeric.element.setAttribute('tabindex', "1"); 
If we misunderstood your query, please provide more details about your requirement for further assistance. 
Pavithra S 

Live Chat Icon For mobile
Up arrow icon