on 10-27-2017 12:19 PM
Hi,
I am trying to get the table row value without having to select the row, and by just clicking on the button to open a pop-up. I am using
var that = this;
press:function(oEvent)
{
var row = oEvent.getSource().getParent();
var index = oTable.indexOfRow(row);
oTable.getContextByIndex(index);
}})
I get an error when I use indexOfRow. It says oTable.indexOfRow is not a function. For that matter, I can't use indexOfItem(), indexOf(), getIndex(). Do I need a plugin for using these methods?
Regards
Sai
Hi,
If you're binded data to the table then you can get the index like below.
disData : function(oEvent) {
var vPath = oEvent.getSource().getBindingContext("TBLMdl").getPath();
// After getting the path use split() function to get the index.
}
BR,
Irfan Gokak
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think your problem is that you are not getting the reference of your event or the table inside the controller function. Debug your application and first find out what the variable oTable holds inside your function, or you could even log it. I think even though you might have initialized it to your table, it might not be getting the reference, and so it might not be supporting the methods.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.