or
<
telerik:RadGrid
ID
=
"grdDetailSummary"
runat
=
"server"
>
<
MasterTableView
DataKeyNames
=
"Id"
ClientDataKeyNames
=
"Id"
>
<
Columns
>
<
telerik:GridTemplateColumn
HeaderText
=
"Open"
UniqueName
=
"colOpenLink"
>
<
ItemTemplate
>
<
asp:LinkButton
runat
=
"server"
ID
=
"lnkReason"
Font-Underline
=
"true"
Text
=
"Open"
OnClientClick
=
"javascript:OpenNewWindow()"
></
asp:LinkButton
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
<
script
language
=
"javascript"
type
=
"text/javascript"
>
function OpenNewWindow() {
//I want to know the row index here, and ultimately i want to get the value from datakeyvalues.
}
</
script
>
Private Sub rcbCompany_ItemChecked(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadComboBoxItemEventArgs) Handles rcbCompany.ItemChecked
prpSelectedCount = Me.rcbCompany.GetCheckedIndices.Count
Dim strToolTipField = IIf(prpDisplayType = "Name", e.Item.Text, e.Item.Value.ToString)
If e.Item.Checked = True Then
'If an item has been checked, add the company number to the prpSelectedValue list and the company code/name to the prpToolTip list.
prpSelectedValue = prpSelectedValue + "," + e.Item.Attributes("CompanyNumber")
prpToolTip = prpToolTip + strToolTipField
Else
'If no companies are check set prpSelectedValue and the prpToolTip to Nothing,
If prpSelectedCount = 0 Then
prpSelectedValue = ""
prpToolTip = ""
Else
'otherwise remove the unchecked company from the prpSelectedValue property
prpSelectedValue = prpSelectedValue.Replace("," + e.Item.Attributes("CompanyNumber"), "")
prpToolTip = prpToolTip.Replace(";" + strToolTipField, "")
End If
End If
'Remove the extra comma, if any at the beginning of the string
If prpSelectedValue.StartsWith(",") = True Then
prpSelectedValue = prpSelectedValue.Remove(0, 1)
End If
If prpToolTip.StartsWith(";") = True Then
prpToolTip = prpToolTip.Remove(0, 1)
End If
Me.rcbCompany.ToolTip = prpToolTip
rttManagerCompany.TargetControls.Clear()
rttManagerCompany.TargetControls.Add(Me.rcbCompany.ClientID, True)
RaiseEvent OnItemCheckedCompanyHandler(sender, e)
End Sub
Private Sub rttManagerCompany_AjaxUpdate(ByVal sender As Object, ByVal e As Telerik.Web.UI.ToolTipUpdateEventArgs) Handles rttManagerCompany.AjaxUpdate
Dim lblToolTip As New Label()
lblToolTip.Text = prpToolTip
e.UpdatePanel.ContentTemplateContainer.Controls.Add(lblToolTip)
End Sub
prpToolTip = prpToolTip + "<br/>" + strToolTipField.
After I added the new line character(<br/>) I get the following error.
Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500
As a test to see if it was my generated tooltip that was causing the problem, I changed the lblToolTip.Text in the rttManagerCompany_AjaxUpdate to "line1 <br/> line2" and I still get the error. If I remove the <br/> I do not get an error and the tooltip displays as line1line2.
Can anyone tell me how to get a new line in the tooltip.
Thank you for your help.
Tracy
After I add the new line
private
string
item1
{
get
{
RadComboBoxItem item =
this
.combobox1.SelectedItem;
if
(item !=
null
)
{
Label lbl= item.FindControl(
"item1"
)
as
Label;
if
(lbl!=
null
) // is always be null
return
lbl.Text;
}
return
""
;
}
}