1

Good day,

I want to impliment either jQuery.autotab, like this question in SCN Auto tabbing in SAP UI5.

I am very new to javascript and would like some assistance with this.

My table looks like this

var oTable = new sap.ui.table.Table({
    selectionMode : sap.ui.table.SelectionMode.MultiToggle
 });

oTable.addColumn(new sap.ui.table.Column({
     label : 'Work Request',
     template : new sap.ui.commons.TextField({
         value : '{requestNo}',
         editable : true
     })
}));

oTable.addColumn(new sap.ui.table.Column({
    label : 'Description',
    template : new sap.ui.commons.TextField({
        value : '{description}',
        editable : true
    })
}));

the answer in SCN suggested to look at jQuery:

$(function () {

    $('.number').autotab('filter','number');

});

$('.number') here .number is the classname.

My question is, how do i get this to work? The example is using normal text fields, but I need to autotab like in Excel between columns.

1 Answer 1

0

Add the respective styleClass to your table.

oTable.addStyleClass('number');

then in onAfterRendering() have your jQuery statements.

$(function () {
    $('.number').autotab('filter','number');
});
1
  • Thanks Sunil. i think we are almost there. I added the code exactly like that but i get the following error now: Uncaught TypeError: $(...).autotab is not a function. Can you please help me out? Jun 1, 2015 at 4:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.