Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

Dynamics crm 2011 get subgrid selected cell value

$
0
0

I need to get specific cell value from selected subgrid rows, i've foud a code to attach click event to the subgrid, but it retreive the name or ID fo the row, how to get the cells value?, the code i sue is below :

function ReadSelectedSubGridRecords() {
if (document.getElementById('Contacts')) {
var grid = document.getElementById('Contacts').control;
var ids = grid.get_selectedRecords();
for (var rowNo = 0; rowNo < grid.get_selectedRecords().length; rowNo++)
alert(grid.get_selectedRecords()[rowNo].Name);
}
}

function Form_OnLoad() {
if (document.getElementById('Contacts')) {
var grid = document.getElementById('Contacts');
if (grid.attachEvent) {
grid.attachEvent('onclick', ReadSelectedSubGridRecords);
}

}
else {
setTimeout("Form_OnLoad();", 2000);
}
}


Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>