Hi
I wonder if anyone can shed any light on what is going on here please.
I have a grid into which I programatically add a hyperlink depending upon the value of a column in each row, like so;
This works fine and pops a Telerik Window with info via a javascript function.
Within each row, I can have a button which when clicked will expand the child row, like so;
When the child row expands, all of the hyperlinks disappear?
I clearly need to trap again to re-apply the link, but where do I do this?
Any help appreciated
Roger
I wonder if anyone can shed any light on what is going on here please.
I have a grid into which I programatically add a hyperlink depending upon the value of a column in each row, like so;
public void RadGrid1_ItemDataBound(object sender, Telerik.Web.UI.GridItemEventArgs e) { if (e.Item is GridDataItem && e.Item.OwnerTableView.Name == "Parent") { string linkValue = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["NotesLink"].ToString(); HyperLink hl = new HyperLink(); string strFunctionToCall = "ViewCheck('" + linkValue + "')"; hl.Attributes.Add("onClick", "return " + strFunctionToCall + ";"); hl.ToolTip = "Click for more info...."; hl.Text = linkValue; hl.Font.Underline = true; hl.ForeColor = Color.Blue; GridDataItem item = (GridDataItem)e.Item; item["NotesLink"].Controls.Add(hl); }}This works fine and pops a Telerik Window with info via a javascript function.
Within each row, I can have a button which when clicked will expand the child row, like so;
protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e){if (e.CommandName == "ShowAbstractDetails" && e.Item.OwnerTableView.Name == "Parent"){ GridDataItem parentRow = e.Item as GridDataItem; parentRow.Selected = true; // Force the row to be selected if (parentRow.HasChildItems) // Ignore ChildRow clicks { // Expand selected item int temp = RadGrid1.SelectedItems.Count; foreach (GridDataItem item in RadGrid1.SelectedItems) { if (item.Selected) { item.Expanded = true; } else { item.Expanded = false; } } }}When the child row expands, all of the hyperlinks disappear?
I clearly need to trap again to re-apply the link, but where do I do this?
Any help appreciated
Roger