error:'undefined' is null or not an object.
in the codebehind:
GridDataItem gridDataItem = e.Item as GridDataItem;
HyperLink GradeBook = e.Item.FindControl("GradeBook") as HyperLink;
GradeBook.Attributes["href"] = "#";
GradeBook.Attributes["onclick"] = string.Format("return ShowGradeBook('{0}');", e.Item.ItemIndex);
which works fine, my JS Function runs:
function ShowGradeBook(rowIndex)
{
var mtv = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
mtv.selectItem(mtv.get_dataItems()[rowIndex].get_element());
var selectedRows = mtv.get_selectedItems();
var row = selectedRows[0];
alert(
"InGradeBOok=" + rowIndex);
tf = mtv.getCellByColumnUniqueName(row,
"CourseID")
var CourseID = tf.innerHTML;
CourseID is defined in the grid as:
<telerik:GridBoundColumn DataField="CourseID" UniqueName="CourseID" Display="false" ></telerik:GridBoundColumn>