Name of column that contains the record id.
If you set primary key, we assume that this number is unique for each records presented in the grid.
For example this should contains the column with primary key from your relation db table.
If the primaryKey is undefined, we autogenerate id for each record in the table by starting from 1.
Examples
sample
<table id="grid"></table>
<script>
var data = [
{ 'ID': 101, 'Name': 'Hristo Stoichkov', 'PlaceOfBirth': 'Plovdiv, Bulgaria' },
{ 'ID': 102, 'Name': 'Ronaldo Luis Nazario de Lima', 'PlaceOfBirth': 'Rio de Janeiro, Brazil' },
{ 'ID': 103, 'Name': 'David Platt', 'PlaceOfBirth': 'Chadderton, Lancashire, England' }
];
$('#grid').grid({
dataSource: data,
primaryKey: 'ID',
columns: [
{ field: 'ID', width: 32 },
{ field: 'Name' },
{ field: 'PlaceOfBirth' } ,
{ tmpl: '<a href="#">click me</a>', events: { click: function(e) { alert('Your id is ' + e.data.id); } }, width: 60, stopPropagation: true }
]
});
</script>