{ "id": "103045", "key": "TIMOB-11629", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2014-02-21T01:04:00.000+0000", "created": "2012-10-10T09:16:47.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-22T17:29:55.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10224", "name": "TiAPI", "description": "This component is used for cross-platform API work. Specifications are most likely to use this component." } ], "description": "As we have a getRowIndexByName (which by the way is not documented),\r\nI thought it would be a great idea to simply have a getRowByName that directly returns the rows so that you can interact with it.\r\n\r\nIn the test case i use it in a click event, which is dumb as you already have e.row, but it s very useful in more complex cases.\r\n\r\n{code}\r\nvar win = Titanium.UI.createWindow();\r\nwin.backgroundColor = '#ccc';\r\n\r\nvar tableview = Ti.UI.createTableView();\r\nwin.add(tableview);\r\n\r\nvar rowData = [];\r\nfor (var i = 0; i < 10; i++) {\r\n\tvar row = Ti.UI.createTableViewRow({\r\n\t\ttitle : 'row ' + i,\r\n\t\tname : 'row ' + i\r\n\t});\r\n\trowData.push(row);\r\n};\r\ntableview.data = rowData;\r\n\r\ntableview.addEventListener('click', function(e) {\r\n\tif (e.row) {\r\n\t\tTi.API.info(JSON.stringify(e.row))\r\n\t\tvar row = tableview.getRowByName(e.row.name);\r\n\t\talert('click on row with name \"' + e.row.name + '\" and the getRowByName return a row with name \"' + row.name + '\"')\r\n\t}\r\n})\r\n\r\nwin.open();\r\n\r\n{code}", "attachment": [], "flagged": false, "summary": "TiAPI: TableView getRowByName", "creator": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "environment": "titanium 3.1.0\r\nios android", "comment": { "comments": [ { "id": "222885", "author": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "body": "pull request https://github.com/appcelerator/titanium_mobile/pull/3148", "updateAuthor": { "name": "farfromrefuge", "key": "farfromrefuge", "displayName": "Martin Guillon", "active": false, "timeZone": "Europe/Berlin" }, "created": "2012-10-10T09:25:12.000+0000", "updated": "2012-10-10T09:25:12.000+0000" }, { "id": "294071", "author": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We are not currently adding new features to TableView. Thank you for the request and the code submission. If people wish to add this functionality, they are welcome to merge the code from the PR. ", "updateAuthor": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-21T01:04:01.000+0000", "updated": "2014-02-21T01:04:01.000+0000" }, { "id": "414799", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue will not fix and with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-22T17:29:55.000+0000", "updated": "2017-03-22T17:29:55.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }