if (e.Row.RowType == DataControlRowType.DataRow)
{
// if no link are presen the cell,
// we add the functionnality to select the row on the cell with a click
cell.Attributes.Add("onclick", "x();");
// here we add the command to postback when the user click somewhere in the cell
cell.Style.Add(HtmlTextWriterStyle.Cursor, "pointer");
cell.Attributes.Add("title", "Select");
}
Actually when I call the function x which is created in c# is not executing but wen I declare in javascript it is executing what is the problem? plz let me know
xdefined? did you really mean to surround it with**?xcontains. Try reading tinyurl.com/so-hints for some good ideas! Again, welcome!x()bold. Which in fact worked in the original version of the question but it was edited and the asterisks weren't removed. I suspect this is a classic "trying to call a C# function from a javscript onclick event client-side" question.