Hi Siva
You can achive this things with little javascript and server side hack,Follow below procedure
1) First if all you need to bind javascript function to your cell in RowDataBound event like following
protected void GridView1_DataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[0].Attributes.Add("onclick","CopyToClipBoard(e.Row.Cells[0].ClientID);");
}
}
as you can see i have taken text of cell as .Text...now it depends on your need..you might have taken label inside you column so you will first use FindControl for that and take Text from it
2) Write Javascript like following along with that you need to add one hidden TextArea to your html,i am also writting same with javascript
<SCRIPT LANGUAGE="JavaScript">
function CopyToClipBoard(controlToFind)
{
copiedText.innerText = document.GetElementById(textToBeCopied).value;
Copied = copiedText.createTextRange();
Copied.execCommand("Copy");
}
</SCRIPT>
<body>
<TEXTAREA ID="copiedText" STYLE="display:none;">
</TEXTAREA>
</body>
now with this you would be able to copy the text to clipboard
i hope you got it
let me know from your side
thxs