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: 
First It must be declared as Object,(may be using 'new' keyword)

```
s1 = "2 + 2";               
s2 = new String("2 + 2");   
console.log(eval(s1));      
console.log(eval(s2));      

```

OR

```
console.log(eval(s2.valueOf()));

```
This should do the job : 

```
 var StringProp=Object.getOwnPropertyNames(String);

 document.write(StringProp); 

 -->>  ["length", "name", "arguments", "caller", "prototype", "fromCharCode"]

```

But you might be more interested by :

```
 var StringProtProp=Object.getOwnPropertyNames(String.prototype);

 document.write(StringProtProp); 

-->> ["length", "constructor", "valueOf", "toString", "charAt", "charCodeAt", "concat", 
"indexOf", "lastIndexOf", "localeCompare", "match", "replace", "search", "slice", "split", 
"substring", "substr", "toLowerCase", "toLocaleLowerCase", "toUpperCase", "toLocaleUpperCase",
 "trim", "trimLeft", "trimRight", "link", "anchor", "fontcolor", "fontsize", "big", "blink", 
"bold", "fixed", "italics", "small", "strike", "sub", "sup"]

```