Yes, this is possible. You can use the following client-side function
(as the event handler for the OnClientSelect event):
function onRecordSelect(arrSelectedRecords) {
var iIndex = 0;
for(var i=0; i<grid1.Rows.length; i++) {
if(grid1.Rows[i].Cells[0].Value == arrSelectedRecords[0].SupplierID) {
iIndex = i;
break;
}
}
var selectedId = getRowPrefix() + iIndex;
alert("The selected row has the following ID: " + selectedId);
}
// find out the row Prefix
function getRowPrefix()
{
var row0 = grid1.getRecordsIds().split(",")[0];
if ( row0 != null)
{
var lastPos = -1;
for ( var i = row0.length-1; i>=0; i--)
{
if ( row0.charAt(i)== '_' )
{
lastPos = i;
break;
}
}
if (lastPos > -1)
{
// get Prefix
return row0.substring(0,lastPos + 1);
}
}
return "";
}
(this assumes that the column storing the primary key - SupplierID in
this example - is the first column from the Grid)
You need to replace "grid1" with the ID of your grid.