Question: With the JQuery DataTables plugin I am using mRender to add buttons to my dynamically added rows. This part works great, but how can I get the rowID of the current row the buttons are added to? I need this to create unique IDs for the buttons.

What do I need to use in place of ???? in the code below?

**JavaScript:**

```
    $('#example').dataTable({
        "aoColumns": [
        { "sTitle": "Person", "mData": "Person" },
        {
            "sTitle": "Buttons", "mData": "Buttons", "mRender": function () {
                var rowID = ?????;
                btnD = '<button id="btnDepth' + rowID + '" data-keyindex="' + rowID + '" data-type="Depth" data-action="Show" class="addDepthGraph" title="Show Depth">D</button>';
                btnG = '<button id="btnGraph' + rowID + '" data-keyindex="' + rowID + '" data-type="Graph"  data-action="Show" class="addDepthGraph" title="Show Graph">G</button>';

                var returnButton = btnD + btnG;
                return returnButton;
            }
        }
        ],
        "bPaginate": false
    });

    $("#addRowOptions").click(function () {
        rowindex = $('#example').dataTable().fnGetData().length;
        obj = [{Person:'PersonA', Buttons: ''}];
        $('#example').dataTable().fnAddData(obj);
    });

```

Answer: 
The properties of `String` are all non-enumerable, which is why your loop does not show them. You can see the own properties in an ES5 environment with the [`Object.getOwnPropertyNames`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Object/getOwnPropertyNames) function:

```
Object.getOwnPropertyNames(String);
// ["length", "name", "arguments", "caller", "prototype", "fromCharCode"]

```

You can verify that they are non-enumerable with the [`Object.getOwnPropertyDescriptor`](https://developer.mozilla.org/en/docs/JavaScript/Reference/Global_Objects/Object/getOwnPropertyDescriptor) function:

```
Object.getOwnPropertyDescriptor(String, "fromCharCode");
// Object {value: function, writable: true, enumerable: false, configurable: true}

```

If you want to see `String` instance methods you will need to look at `String.prototype`. Note that these properties are also non-enumerable:

```
Object.getOwnPropertyNames(String.prototype);
// ["length", "constructor", "valueOf", "toString", "charAt"...

```
try using the console in developer tools in Chrome or Firebug in Firefox.

and try this

```
    for (x in new String()) {
       console.log(x);   
    }

```