【问题标题】:Add hyperlink style to Telerik Report向 Telerik Report 添加超链接样式
【发布时间】:2012-08-26 20:48:41
【问题描述】:

问题: 我需要将下面的内部样式添加到 Telerik 报告中。请注意 a0 和 a1 是类。
样式表如下:如何将其转换为 Telerik 报告接受的 XML 样式表。
参考:http://www.telerik.com/help/reporting/style-understanding-style-selectors.html
但是该链接没有详细说明如何将超链接选择器添加到 XML 样式表中。

下面的CSS:

a.a0:hover {
        text-decoration: underline;
}
a.a1:link {
text-decoration: underline;
}

【问题讨论】:

    标签: asp.net css xslt telerik telerik-reporting


    【解决方案1】:
    Below is how I worked around the above issue:
    ReportViewer.prototype.OnReportLoadedOld = ReportViewer.OnReportLoaded;
                    ReportViewer.prototype.OnReportLoaded = function() {
                        this.OnReportLoadedOld();
    
    var reportFrame = document.getElementById(this.reportFrameID);
                        var reportDocument = reportFrame.contentWindow.document;
                        var body = reportDocument.getElementsByTagName("body")[0];
    
     $(".a1", body).css("text-decoration", "underline");
     $(".a0", body).css("text-decoration", "underline");
    
    You can achive the hover like this:
    
    $(".a1", body).hover(function() {
            $(".a1", body).css("text-decoration", "underline");
          }, function () {
           $(".a1", body).css("text-decoration", "underline");
      });
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-05-08
      • 1970-01-01
      • 2017-03-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-28
      相关资源
      最近更新 更多