复制GridView单元格内容到剪贴板

  1. protectedvoidGridView1_RowDataBound(objectsender,GridViewRowEventArgse)
  2. {
  3. if(e.Row.RowType==DataControlRowType.DataRow)
  4. {
  5. foreach(TableCellcelline.Row.Cells)
  6. {
  7. cell.Attributes["onclick"]="window.clipboardData.setData('Text',this.innerText);";
  8. }
  9. }
  10. }

你可能感兴趣的:(GridView)