I disable a particular cell of my gridview on page load as follows
grdInvoice.Rows[grdInvoice.Rows.Count-1]
          .Cells[6].Enabled = false;
Now I would like to apply a javascript alert function for this cell
I tried this
grdInvoice.Rows[grdInvoice.Rows.Count-1]
          .Cells[6].Attributes.Add["onclick"]="f1();"
My function is as follows
<script type="text/javascript">
function f1() {
    alert('no more rows found to copy');
}
But didn't work for me ..
 
     
     
     
     
    