After successfully solving my previous question, I encountered a new issue. The code that was working perfectly in Internet Explorer now behaves differently in Firefox.
Here is the C# code:
protected void OnRowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("ondblclick", "sample(this)");
}
}
This is how my javascript looks:
function sample(rowIn) {
alert("D");
var gViewRowColumn = rowIn.cells[0];
var displayCell = gViewRowColumn.innerText;
alert(displayCell);
}
The problem arises when testing it in Firefox. While the first alert shows "D" as expected, the second alert just displays "undefined". I tried researching online and came across suggestions related to events, but I couldn't fully comprehend or apply them correctly. Any assistance on this would be highly appreciated.