<pre>$(function () { var grid = document.getElementById('<%= gvDetails.ClientID%>'); $('tr', grid).on('click', function () { $("#id").html($(".clsempid", $(this).closest("tr")).html()); $("#name").html($(".clsempid1", $(this).closest("tr")).html()); $("#department").html($(".clsempid2", $(this).closest("tr")).html()); $("#age").html($(".clsempid3", $(this).closest("tr")).html()); $("#sal").html($(".clsempid4", $(this).closest("tr")).html()); $("#dialog").dialog({ title: "View Details", buttons: { Ok: function () { $(this).dialog('close'); } }, modal: true }); }); });
<code> your html
$('tr', grid).on('click', function (obj, b) { if (['Update', 'Edit', 'Add'].indexOf(obj.target.value) > -1) return;
alert(obj.target.value)
$('tr', grid).on('click', function (obj,b) { alert(obj.target.value)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)