Hi,
I have a RadGrid which contains Parent Rows and each parent Row has Child Rows(populating Child rows with DetailTableDataBind event).
and i am creating a hyperlink inside the child table
I have a RadGrid which contains Parent Rows and each parent Row has Child Rows(populating Child rows with DetailTableDataBind event).
and i am creating a hyperlink inside the child table
protected void grd_ItemDataBound(object sender, GridItemEventArgs e)
{
if (e.Item.OwnerTableView.Name == "ChildTable" && e.Item is GridDataItem)
{
GridDataItem item = (GridDataItem)e.Item;
string szID = item.GetDataKeyValue("ID").ToString();
string szName = item.GetDataKeyValue("NAME").ToString();
HyperLink hLink = (HyperLink)item.FindControl("HyperLink1");
hLink.Text = szName;
hLink.Attributes.Add("onclick", "return onDocClick('" + item.OwnerTableView.ParentItem.ItemIndex + "', '" + item.ItemIndex + "');");
}
}
Javascript
function onDocClick(parentindex, childindex)
{
// here How do i select/check Corresponding Parent Row and Child Row?
}