hclleapforum

Open full view…

Tables

technologirl
Tue, 06 Aug 2019 17:23:53 GMT

I've seen that we could get the selected row of a table with: var selected = item.getSelection() I want to use the setSelection() function but on the examples always use it with "-1" to clear history table selection page.F_Table0.setSelection(-1); //clear history table selection I tried to use it with other numbers as "0" or "1" but it doesn't work, I'm doing right? what index I have to use for selecting the 1st row of the table with code?

dingwei
Tue, 06 Aug 2019 23:20:23 GMT

var rowNum =page.F_Table10.getBOAttr().getLength(); if(rowNum>0) { var rowNum =page.F_Table10.getBOAttr().getLength();//获取Table行数 BO.F_SingleLine374.setValue(page.F_Table10.getBOAttr().get(rowNum-1).F_SingleLine116.getValue());//获取该行指定字段的值 }