Almost ready . Maybe one of the javascript guru's can help me again?
I added a checkbox to the list and need to enrich the listdata with a checkbox indicator and set it to standard value 'N'
After that want to the extra values to Y only for the checked rows
Have as code:
I added a checkbox to the list and need to enrich the listdata with a checkbox indicator and set it to standard value 'N'
After that want to the extra values to Y only for the checked rows
Have as code:
Code:
[COLOR=#2980b9]//first I add to every record in listdata an extra collumn 'isChecked', //because that indicator is not in the output of the function getListData()[/COLOR] var data = {dialog.object}.getListData('SIGNLIST'); var jsonchecked = {isChecked:'N'}; for (var i = 0; i < data.length; i++) { A5.u.object.assign(data[i],jsonchecked); } [COLOR=#2980b9]//until here everything works ok //Then I want to change the value of isChecked to Y for the checked rows[/COLOR] var listObj = {dialog.object}.getControl('Signlist'); if (listObj) { var checkedRows = listObj.getCheckedRows(); //according to documentation Returns an array of row number (zero based) of rows that are checked. jsonchecked = {isChecked:'Y'}; if (checkedRows.length > 0) { for (var i = 0; i < checkedRows.length; i++) { var rowNum = checkedRows[i].[i]; [COLOR=#c0392b]// this syntax is wrong, here 'm stuck, how do i get the value of checked rows?[/COLOR] A5.u.object.assign(data[rowNum],jsonchecked,false); alert(rowNum); //just for testing } }
Comment